• + 0 comments
    import re 
    
    N = int(input())
    
    hex_code = r'#[0-9A-Fa-f]{3,6}(?=[^\w-])'
    
    css_colors = []
    
    for _ in range(N):
        line = input()
        css_colors.extend(re.findall(hex_code, line))
        
    print('\n'.join(css_colors))