def main(): text = input() refer = {"A": "2", "B": "3", "C": "4", "D": "5", "E": "6", "F": "7"} # A:13, B:14, C:15, D:16, E:17, F:18 strs = list(text) first = strs[0] if len(strs) == 1: print(" ".join(["1", refer[strs[0]]])) return for s in strs[1:]: if s != first: print("1") return print(" ".join(["1", refer[first]])) if __name__ == '__main__': main()