def find_variants(tile):
    """ Find all flipped/rotated variants of a tile """
    t = tile[0]
    r = tile[1]
    b = tile[2]
    l = tile[3]
    tr = "".join(reversed(tile[0]))
    rr = "".join(reversed(tile[1]))
    br = "".join(reversed(tile[2]))
    lr = "".join(reversed(tile[3]))
    return [
        [t,   r,  b,   l ], # orig
        [b,   rr, t,   lr], # flip-x
        [tr,  l,  br,  r ], # flip-y
        [br,  lr, tr,  rr], # flip-xy, or rotate-180
        [r,   br, l,   tr], # rotate-left
        [l,   b,  r,   t],  # rotate-left, then flip-x
        [rr,  tr, lr,  br], # rotate-left, then flip-y
        [lr,  t,  rr,  b]   # rotate-right
    ]