arr = sorted([input() for _ in range(3)]) for s in arr: if "зайка" in s: print(s, len(s)) break