arr = map(int, list(raw_input().strip().split()))
n = arr[0]
k = arr[1]

s = set(list(raw_input().strip()))
for i in xrange(1, n):
	global s
	t = set(list(raw_input().strip()))
	s.intersection_update(t)
	
if len(s) >= k:
	print ":-)"
else:
	print ":-("