from sys import stdin
def intersect(a,b):
    return a&b
a=map(int,stdin.readline().split())
b=[]
for i in range(0,a[0]):
    b.append(set(raw_input()))
print ':-)' if len(reduce(intersect,b))>=a[1] else ':-('