Buggy python submission (verdict: Runtime Error):
n = int(input())
S = ['S']
H = ['H']
C = ['C']
D = ['D']
for i in range(0, n):
 x = input().split()
 if x[0] == 'S':
  S.append(int(x[1])
 elif x[0] == 'H':
  H.append(int(x[1])
 elif x[0] == 'C':
  C.append(int(x[1])
 else:
  D.append(int(x[1])
def print(list):
 list.sort()
 for i in range(1, 14):
  if i not in list:
   print("{0} {1}".format(list[0], i, end = "\n")
print(S)
print(H)
print(C)
print(D)
 

Fixed submission:
n = int(input())
S = []
H = []
C = []
D = []
for i in range(0, n):
 x = list(input().split())
 if x[0] == 'S':
  S.append(int(x[1]))
 elif x[0] == 'H':
  H.append(int(x[1]))
 elif x[0] == 'C':
  C.append(int(x[1]))
 else:
  D.append(int(x[1]))
def pr(list, type):
 list.sort()
 for i in range(1, 14):
  if i not in list:
   print("{0} {1}".format(type, i))
pr(S, 'S')
pr(H, 'H')
pr(C, 'C')
pr(D, 'D')

Buggy python submission (verdict: Runtime Error):
n = int(input())
S = ['S']
H = ['H']
C = ['C']
D = ['D']
for i in range(0, n):
 x = list(input().split())
 if x[0] == 'S':
  S.append(int(x[1])
 elif x[0] == 'H':
  H.append(int(x[1])
 elif x[0] == 'C':
  C.append(int(x[1])
 else:
  D.append(int(x[1])
def print(list):
 list.sort()
 for i in range(1, 14):
  if i not in list:
   print("{0} {1}".format(list[0], i, end = "\n")
print(S)
print(H)
print(C)
print(D)
 

Fixed submission:
n = int(input())
S = []
H = []
C = []
D = []
for i in range(0, n):
 x = list(input().split())
 if x[0] == 'S':
  S.append(int(x[1]))
 elif x[0] == 'H':
  H.append(int(x[1]))
 elif x[0] == 'C':
  C.append(int(x[1]))
 else:
  D.append(int(x[1]))
def pr(list, type):
 list.sort()
 for i in range(1, 14):
  if i not in list:
   print("{0} {1}".format(type, i))
pr(S, 'S')
pr(H, 'H')
pr(C, 'C')
pr(D, 'D')

Buggy python submission (verdict: Runtime Error):
n = int(input())
S = ['S']
H = ['H']
C = ['C']
D = ['D']
for i in range(0, n):
 x = list(input().split())
 if x[0] == 'S':
  S.append(int(x[1]))
 elif x[0] == 'H':
  H.append(int(x[1]))
 elif x[0] == 'C':
  C.append(int(x[1]))
 else:
  D.append(int(x[1]))
def print(list):
 list.sort()
 for i in range(1, 14):
  if i not in list:
   print("{0} {1}".format(list[0], i, end = "\n")
print(S)
print(H)
print(C)
print(D)
 

Fixed submission:
n = int(input())
S = []
H = []
C = []
D = []
for i in range(0, n):
 x = list(input().split())
 if x[0] == 'S':
  S.append(int(x[1]))
 elif x[0] == 'H':
  H.append(int(x[1]))
 elif x[0] == 'C':
  C.append(int(x[1]))
 else:
  D.append(int(x[1]))
def pr(list, type):
 list.sort()
 for i in range(1, 14):
  if i not in list:
   print("{0} {1}".format(type, i))
pr(S, 'S')
pr(H, 'H')
pr(C, 'C')
pr(D, 'D')

Buggy python submission (verdict: Runtime Error):
n = int(input())
S = ['S']
H = ['H']
C = ['C']
D = ['D']
for i in range(0, n):
 x = list(input().split())
 if x[0] == 'S':
  S.append(int(x[1]))
 elif x[0] == 'H':
  H.append(int(x[1]))
 elif x[0] == 'C':
  C.append(int(x[1]))
 else:
  D.append(int(x[1]))
def print(list):
 list.sort()
 for i in range(1, 14):
  if i not in list:
   print("{0} {1}".format(list[0], i), end = "\n")
print(S)
print(H)
print(C)
print(D)
 

Fixed submission:
n = int(input())
S = []
H = []
C = []
D = []
for i in range(0, n):
 x = list(input().split())
 if x[0] == 'S':
  S.append(int(x[1]))
 elif x[0] == 'H':
  H.append(int(x[1]))
 elif x[0] == 'C':
  C.append(int(x[1]))
 else:
  D.append(int(x[1]))
def pr(list, type):
 list.sort()
 for i in range(1, 14):
  if i not in list:
   print("{0} {1}".format(type, i))
pr(S, 'S')
pr(H, 'H')
pr(C, 'C')
pr(D, 'D')

Buggy python submission (verdict: Runtime Error):
n = int(input())
S = ['S']
H = ['H']
C = ['C']
D = ['D']
for i in range(0, n):
 x = list(input().split())
 if x[0] == 'S':
  S.append(int(x[1]))
 elif x[0] == 'H':
  H.append(int(x[1]))
 elif x[0] == 'C':
  C.append(int(x[1]))
 else:
  D.append(int(x[1]))
def print(list):
 list.sort()
 for i in range(1, 14):
  if i not in list:
   print("{0} {1}".format(list[0], i))
   print()
print(S)
print(H)
print(C)
print(D)
 

Fixed submission:
n = int(input())
S = []
H = []
C = []
D = []
for i in range(0, n):
 x = list(input().split())
 if x[0] == 'S':
  S.append(int(x[1]))
 elif x[0] == 'H':
  H.append(int(x[1]))
 elif x[0] == 'C':
  C.append(int(x[1]))
 else:
  D.append(int(x[1]))
def pr(list, type):
 list.sort()
 for i in range(1, 14):
  if i not in list:
   print("{0} {1}".format(type, i))
pr(S, 'S')
pr(H, 'H')
pr(C, 'C')
pr(D, 'D')

Buggy python submission (verdict: Runtime Error):
n = int(input())
S = []
H = []
C = []
D = []
for i in range(0, n):
 x = list(input().split())
 if x[0] == 'S':
  S.append(int(x[1]))
 elif x[0] == 'H':
  H.append(int(x[1]))
 elif x[0] == 'C':
  C.append(int(x[1]))
 else:
  D.append(int(x[1]))
def print(list, type):
 list.sort()
 for i in range(1, 14):
  if i not in list:
   print("{0} {1}".format(type, i))
   print()
print(S, 'S')
print(H, 'H')
print(C, 'C')
print(D, 'D')
 

Fixed submission:
n = int(input())
S = []
H = []
C = []
D = []
for i in range(0, n):
 x = list(input().split())
 if x[0] == 'S':
  S.append(int(x[1]))
 elif x[0] == 'H':
  H.append(int(x[1]))
 elif x[0] == 'C':
  C.append(int(x[1]))
 else:
  D.append(int(x[1]))
def pr(list, type):
 list.sort()
 for i in range(1, 14):
  if i not in list:
   print("{0} {1}".format(type, i))
pr(S, 'S')
pr(H, 'H')
pr(C, 'C')
pr(D, 'D')