k = int(input())
if k == 13:
    print('''6C TC JC QC 6D 8D 9D TD JD QD KD 7S 8S TS JS KS AS TH
7C 8C 9C KC AC 7D AD 6S 9S QS 6H 7H 8H 9H JH QH KH AH

6C 8C AC 6D 8D TD JD KD 6S 8S 9S TS JS QS 8H JH KH AH
7C 9C TC JC QC KC 7D 9D QD AD 7S KS AS 6H 7H 9H TH QH

6C 8C 9C QC KC AC 6D 7D JD AD 8S JS 6H 7H 8H 9H QH AH
7C TC JC 8D 9D TD QD KD 6S 7S 9S TS QS KS AS TH JH KH

8C TC QC AC 6D 7D TD QD KD 6S 7S JS QS KS 7H 9H TH JH
6C 7C 9C JC KC 8D 9D JD AD 8S 9S TS AS 6H 8H QH KH AH

6C 9C KC 6D 7D TD JD KD AD TS JS QS AS 9H TH JH QH AH
7C 8C TC JC QC AC 8D 9D QD 6S 7S 8S 9S KS 6H 7H 8H KH

7C 9C TC QC KC 8D AD 6S 7S 8S 9S JS AS 6H 7H 8H JH KH
6C 8C JC AC 6D 7D 9D TD JD QD KD TS QS KS 9H TH QH AH

TC JC QC AC 7D 8D AD 7S TS JS QS KS 7H 9H TH JH QH AH
6C 7C 8C 9C KC 6D 9D TD JD QD KD 6S 8S 9S AS 6H 8H KH

9C QC KC 6D 7D JD QD 6S 7S 8S JS AS 6H 7H 9H TH KH AH
6C 7C 8C TC JC AC 8D 9D TD KD AD 9S TS QS KS 8H JH QH

6C 6D 7D 8D 9D TD JD QD AD 6S 7S 8S TS QS 7H 8H JH QH
7C 8C 9C TC JC QC KC AC KD 9S JS KS AS 6H 9H TH KH AH

6C 8C JC QC KC AC 8D 9D 7S TS JS QS AS 7H 8H TH QH AH
7C 9C TC 6D 7D TD JD QD KD AD 6S 8S 9S KS 6H 9H JH KH

8C 9C 6D 9D KD 6S 7S 8S TS JS QS KS AS 7H 8H 9H KH AH
6C 7C TC JC QC KC AC 7D 8D TD JD QD AD 9S 6H TH JH QH

7C 8C 9C KC AC 6D 7D 9D JD 6S 8S TS QS KS AS 7H 9H QH
6C TC JC QC 8D TD QD KD AD 7S 9S JS 6H 8H TH JH KH AH

6C 8C JC KC AC 9D 9S TS QS KS AS 6H 7H 8H JH QH KH AH
7C 9C TC QC 6D 7D 8D TD JD QD KD AD 6S 7S 8S JS 9H TH''')
else:
    print('''KS QD 8D QC 8S 8C JD 9H AC TH 9S 9D QH 7H 8H TS 7S 9C
6D JS 7D KH QS TC AD AS KC 6C 7C TD AH KD 6S JC JH 6H

JC JS 8S TD JD KH 7D 9C KC TH QD 8D 7H TC KD 9H 8C 6D
7S AC QH AD 8H TS 6H JH 6C AH 7C 6S 9D QC AS QS KS 9S''')
