n,k = map(int,raw_input().split())
we_get = set(list(raw_input()))
for i in xrange(n-1):
	
	inp = set(list(raw_input()))
	we_get = inp.intersection(we_get)


if len(we_get) >=k:
	print ":-)"
else:
	print ":-("