Buggy python submission (verdict: Runtime Error):
#ITP1_6_B


n= int(input())

T=[[0 for j in range(13)]for m in range(4)]
format(T)

for i in range(n):
    a,b = input().split()
    b=int(b)
    
    if a=='S':
        T[0][b] = 1
    elif a=='H':
      T[1][b] = 1
    elif a=='C':
      T[2][b] = 1
    else:
      T[3][b] = 1
c=int(0)
d=int(0)
for j in range(4):
  for i in range (13):
    if T[c][d] == 0:
      if c==0:
        K = "S"
      elif c==1:
        K = "H"
      elif c==2:
        K = "C"
      else:
        K = "D"
    print(K,d)
    d=d+1
  c=c+1
    


Fixed submission:
#ITP1_6_B


n= int(input())

T=[[0 for j in range(13)]for m in range(4)]
format(T)

for i in range(n):
    a,b = input().split()
    b=int(b)
    
    if a=='S':
      T[0][b-1] = 1
    elif a=='H':
      T[1][b-1] = 1
    elif a=='C':
      T[2][b-1] = 1
    else:
      T[3][b-1] = 1
for c in range(4):
  for d in range (13):
    if T[c][d] == 0:
      if c==0:
        K = "S"
      elif c==1:
        K = "H"
      elif c==2:
        K = "C"
      else:
        K = "D"
      print(K,d+1)
    else:
      pass

Buggy python submission (verdict: Runtime Error):
#ITP1_6_B


n= int(input())

T=[[0 for j in range(13)]for m in range(4)]
format(T)

for i in range(n):
    a,b = input().split()
    b=int(b)
    
    if a=='S':
      T[0][b-1] = 1
    elif a=='H':
      T[1][b-1] = 1
    elif a=='C':
      T[2][b-1] = 1
    else:
      T[3][b-1] = 1
c=int(0)
d=int(0)
for j in range(4):
  for i in range (13):
    if T[c][d] == 0:
      if c==0:
        K = "S"
      elif c==1:
        K = "H"
      elif c==2:
        K = "C"
      else:
        K = "D"
    print(K,d+1)
    d=d+1
  c=c+1
    


Fixed submission:
#ITP1_6_B


n= int(input())

T=[[0 for j in range(13)]for m in range(4)]
format(T)

for i in range(n):
    a,b = input().split()
    b=int(b)
    
    if a=='S':
      T[0][b-1] = 1
    elif a=='H':
      T[1][b-1] = 1
    elif a=='C':
      T[2][b-1] = 1
    else:
      T[3][b-1] = 1
for c in range(4):
  for d in range (13):
    if T[c][d] == 0:
      if c==0:
        K = "S"
      elif c==1:
        K = "H"
      elif c==2:
        K = "C"
      else:
        K = "D"
      print(K,d+1)
    else:
      pass

Buggy python submission (verdict: Runtime Error):
#ITP1_6_B


n= int(input())

T=[[0 for j in range(13)]for m in range(4)]
format(T)

for i in range(n):
    a,b = input().split()
    b=int(b)
    
    if a=='S':
      T[0][b-1] = 1
    elif a=='H':
      T[1][b-1] = 1
    elif a=='C':
      T[2][b-1] = 1
    else:
      T[3][b-1] = 1
c=0
c=int(c)
d=0
d=int(d)
for j in range(4):
  for i in range (13):
    if T[c][d] == 0:
      if c==0:
        K = "S"
      elif c==1:
        K = "H"
      elif c==2:
        K = "C"
      else:
        K = "D"
    print(K,d+1)
    d=d+1
  c=c+1
    


Fixed submission:
#ITP1_6_B


n= int(input())

T=[[0 for j in range(13)]for m in range(4)]
format(T)

for i in range(n):
    a,b = input().split()
    b=int(b)
    
    if a=='S':
      T[0][b-1] = 1
    elif a=='H':
      T[1][b-1] = 1
    elif a=='C':
      T[2][b-1] = 1
    else:
      T[3][b-1] = 1
for c in range(4):
  for d in range (13):
    if T[c][d] == 0:
      if c==0:
        K = "S"
      elif c==1:
        K = "H"
      elif c==2:
        K = "C"
      else:
        K = "D"
      print(K,d+1)
    else:
      pass

Buggy python submission (verdict: Runtime Error):
n= int(input())

T=[[0 for j in range(13)]for m in range(4)]
format(T)

for i in range(n):
    a,b = input().split()
    b=int(b)
    
    if a=='S':
      T[0][b-1] = 1
    elif a=='H':
      T[1][b-1] = 1
    elif a=='C':
      T[2][b-1] = 1
    else:
      T[3][b-1] = 1

for j in range(4):
  for i in range (13):
    if T[i][j] == 0:
      if c==0:
        K = "S"
      elif c==1:
        K = "H"
      elif c==2:
        K = "C"
      else:
        K = "D"
    print(K,d+1)


Fixed submission:
#ITP1_6_B


n= int(input())

T=[[0 for j in range(13)]for m in range(4)]
format(T)

for i in range(n):
    a,b = input().split()
    b=int(b)
    
    if a=='S':
      T[0][b-1] = 1
    elif a=='H':
      T[1][b-1] = 1
    elif a=='C':
      T[2][b-1] = 1
    else:
      T[3][b-1] = 1
for c in range(4):
  for d in range (13):
    if T[c][d] == 0:
      if c==0:
        K = "S"
      elif c==1:
        K = "H"
      elif c==2:
        K = "C"
      else:
        K = "D"
      print(K,d+1)
    else:
      pass

Buggy python submission (verdict: Runtime Error):
n= int(input())

T=[[0 for j in range(13)]for m in range(4)]
format(T)

for i in range(n):
    a,b = input().split()
    b=int(b)
    
    if a=='S':
      T[0][b-1] = 1
    elif a=='H':
      T[1][b-1] = 1
    elif a=='C':
      T[2][b-1] = 1
    else:
      T[3][b-1] = 1

for j in range(4):
  for i in range (13):
    if T[j][i] == 0:
      if c==0:
        K = "S"
      elif c==1:
        K = "H"
      elif c==2:
        K = "C"
      else:
        K = "D"
    print(K,d+1)


Fixed submission:
#ITP1_6_B


n= int(input())

T=[[0 for j in range(13)]for m in range(4)]
format(T)

for i in range(n):
    a,b = input().split()
    b=int(b)
    
    if a=='S':
      T[0][b-1] = 1
    elif a=='H':
      T[1][b-1] = 1
    elif a=='C':
      T[2][b-1] = 1
    else:
      T[3][b-1] = 1
for c in range(4):
  for d in range (13):
    if T[c][d] == 0:
      if c==0:
        K = "S"
      elif c==1:
        K = "H"
      elif c==2:
        K = "C"
      else:
        K = "D"
      print(K,d+1)
    else:
      pass