N = int(input())
CardList = [0 for i in range(52)]
for i in range(N):
    Mark, Rank = map(str, input().split())
    if Mark == 'S':
        CardList[int(Rank) -1 ] = 1
    elif Mark == 'H':
        CardList[int(Rank) + 12] = 1
    elif Mark == 'C':
        CardList[int(Rank) + 25] = 1
    else:
        CardList[int(Rank) + 38] = 1
for j in range(52):
    if CardList[j] == 0:
        if 0 <= j <13:
            print('S', j +1)
        elif 13 <= j < 27:
            print('H', (j % 13) + 1)
        elif 27 <= j <40:
            print('C', (j % 13) + 1)
        else:
            print('D', (j % 13) + 1)
