Harryxun/stf_run huggingface dataset:
import deque
S=input()

stack=deque()
cnt=0
for s in S:
    if not stack:
        stack.append(s)
    elif s!=stack[-1]:
        stack.pop()
        cnt+=2
    else:
        stack.append(s)
        
print(cnt)
        

### FIXED CODE ###

S=input()

stack=[]
cnt=0
for s in S:
    if not stack:
        stack.append(s)
    elif s!=stack[-1]:
        stack.pop()
        cnt+=2
    else:
        stack.append(s)
        
print(cnt)
def do(level,x):
    if x<=0: #1層も手を付けないとき
        return 0
    elif x>=whole[level]: #完食できるとき
        return patty[level]
    #それ以外、途中まで食べるときはlevel>=1の場合のみあり得る
    x-=1 #このとき1層目は必ずバンズ
    res=0 ＃食べたパティの総数を記録する
    if x>=whole[level-1]+1: #真ん中のパティまで到達できるとき
        x-=whole[level-1]+1
        res+=patty[level-1]+1
    return res+do(level-1,x)

n,x=map(int,input().split())
whole=[1]+[0]*50
patty=[1]+[0]*50
for i in range(1,n+1):
    whole[i]=whole[i-1]*2+3
    patty[i]=patty[i-1]*2+1
res=0
print(do(n,x))

### FIXED CODE ###

def do(level,x):
    if x<=0:
        return 0
    if level==0:
        return 1
    res=0
    x-=1
    if x>j[level-1]:
        x-=j[level-1]+1
        res+=k[level-1]+1
    return res+do(level-1,x)

n,x=map(int,input().split())
j=[1]+[0]*50
k=[1]+[0]*50
for i in range(1,n+1):
    j[i]=j[i-1]*2+3
    k[i]=k[i-1]*2+1
res=0
print(do(n,x))
N,M = list(map(int,input().split()))
SC = [0]*(M+1)
if M == 0:
  print(1*10**(N-1))
  exit()
for m in range(M):
  sc = list(map(int,input().split()))
  if (sc[0] == 1) and (sc[1] == 0):
    print(-1)
    exit()
  elif sc[0] > N:
    print(-1)
    exit()
  elif SC[sc[0]] == 0:
    SC[sc[0]] = sc[1]
  else:
    if SC[sc[0]] != sc[1]:
      print(-1)
      exit()


if SC[1]==0:
  SC[1] = 1
ans = 0
for i in range(N):
  ans += 10**(N-i-1)*SC[i+1]

print(ans)

### FIXED CODE ###

N,M = list(map(int,input().split()))
SC = [0]*(N+1)
if M == 0:
  if N==1:
    print(0)
    exit()
  else:
    print(1*10**(N-1))
    exit()

for m in range(M):
  sc = list(map(int,input().split()))
  if (sc[0] == 1) and (sc[1] == 0):
    if N==1:
      continue
    else:
      print(-1)
      exit()
  elif sc[0] > N:
    print(-1)
    exit()
  elif SC[sc[0]] == 0:
    SC[sc[0]] = sc[1]
  else:
    if SC[sc[0]] != sc[1]:
      print(-1)
      exit()

if (SC[1]==0) and (N > 1):
  SC[1] = 1
ans = 0
for i in range(N):
  ans += 10**(N-i-1)*SC[i+1]

print(ans)
N = int(input())
s, t = input().split()

for i in range(N):
  print(s[i], t[i], seq = '')
  
  


### FIXED CODE ###

N = int(input())
s, t = input().split()

new = list()
for i in range(N):
  new.append(s[i])
  new.append(t[i])
  
print(*new, sep='')
book = input()
if book % 10 = 0 or if book % 10 = 1 or if book % 10 = 6 or if book % 10 = 8 :
	print(pon)
elif book % 10 = 2 or book % 10 = 4 or book % 10 = 5 or book % 10 = 7 or book % 10 = 9:
	print(hon)
elif book % 10 = 3 :
	print(bon)


### FIXED CODE ###

book = int(input())
if book % 10 == 0 or book % 10 == 1 or book % 10 == 6 or book % 10 == 8 :
	print('pon')
elif book % 10 == 2 or book % 10 == 4 or book % 10 == 5 or book % 10 == 7 or book % 10 == 9:
	print('hon')
elif book % 10 == 3 :
	print('bon')
n,m,x=map(int,input().split())
ans=999999999999999999
a=[0]*m
for i in range(n):
  a[i]=list(map(int,input().split()))
for i in range(2**n):
  t=[0]*m
  temp=0
  for j in range(n):
    if (i>>j)&1:
      temp=temp+a[j][0]
      for k in range(m):
        t[k]=t[k]+a[j][k+1]
  if min(t)>=x:
    ans=min(ans,temp)
if ans==999999999999999999:
  print(-1)
else:
  print(ans)

### FIXED CODE ###

n,m,x=map(int,input().split())
ans=999999999999999999
a=[0]*n
for i in range(n):
  a[i]=list(map(int,input().split()))
for i in range(2**n):
  t=[0]*m
  temp=0
  for j in range(n):
    if (i>>j)&1:
      temp=temp+a[j][0]
      for k in range(m):
        t[k]=t[k]+a[j][k+1]
  if min(t)>=x:
    ans=min(ans,temp)
if ans==999999999999999999:
  print(-1)
else:
  print(ans)
def li():
    return list(map(int, input().split()))


if __name__ == "__main__":
    [n, x] = li()
    l_list = li()

    bound = 0
    bound_x = 0
    index = 0
    while bound_x <= x:
        bound = bound + 1
        bound_x = bound_x + l_list[index]
        index = index + 1
    print(bound)


### FIXED CODE ###

def li():
    return list(map(int, input().split()))


if __name__ == "__main__":
    [n, x] = li()
    l_list = li()

    bound = 0
    bound_x = 0
    index = 0
    bound = bound + 1
    while bound_x + l_list[index] <= x:
        bound = bound + 1
        bound_x = bound_x + l_list[index]
        index = index + 1
        if index >= len(l_list):
            break

    print(bound)
N = int(input())
C = [int(input()) for _ in range(N)]
MOD = 10**9 + 7

dp = [1,1]
last_idx = [-1]*(N+1)
last_idx[C[0]] = 0
last_idx[C[1]] = 1

for i in range(2, N):
    if C[i-1] == C[i] or last_idx[C[i]] == -1:
        dp.append(dp[-1] % MOD)
    else:
        dp.append((dp[-1] + dp[last_idx[C[i]]]) % MOD)
    last_idx[C[i]] = i

print(dp[-1])

### FIXED CODE ###

N = int(input())
C = [int(input()) for _ in range(N)]
MOD = 10**9 + 7

if N <= 2:
    print(1)
    exit()

dp = [1,1]
last_idx = [-1]*(N+10)
last_idx[C[0]] = 0
last_idx[C[1]] = 1

for i in range(2, N):
    if C[i-1] == C[i] or last_idx[C[i]] == -1:
        dp.append(dp[-1] % MOD)
    else:
        dp.append((dp[-1] + dp[last_idx[C[i]]]) % MOD)
    last_idx[C[i]] = i

print(dp[-1])
n = int(raw_input())

dp = [1, 1]

for i in range(50):
    dp += dp[-1] + dp[-2]

print dp[n]



### FIXED CODE ###

n = int(raw_input())

dp = [1, 1]

for i in range(50):
    dp += [dp[-1] + dp[-2]]

print dp[n]
a, b = map(int, input().split())
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a
n = gcd(a, b)

def cd(num):
    k = []
    if num%2 == 0:
        if is_prime(2):
            k.append(i) 
    for i in range(1,num+1):
        if num%i == 0:
            if is_prime(i):
                k.append(i) 
    return k

def is_prime(num):
    for i in range(2, num):
        if num % i == 0:
            return False
    return True


gc = gcd(a,b)
c = cd(gc)

print(len(c))

### FIXED CODE ###

def f(n):
    res = set()
    for i in range(2, int(n ** 0.5)):
        if n % i: continue
        while not n % i: n //= i
        res.add(i)
    return res | {n}
 
a, b = map(int,input().split())
print(len(f(a) & f(b) | {1}))
o=input()
e=input()
j,k=0,0
for i in range(len(o)+len(e)):
  if i %2:
    res+=e[k]
    k+=1
  else:
    res+=o[j]
    j+=1
print(res)

### FIXED CODE ###

o=input()
e=input()
j,k,res=0,0,""
for i in range(len(o)+len(e)):
  if i %2:
    res+=e[k]
    k+=1
  else:
    res+=o[j]
    j+=1
print(res)
import sys
input = sys.stdin.readline
N,K=list(map(int,input().split()))
S = list(input().rstrip())
S[K]=S[K].lower()
print("".join(S))


### FIXED CODE ###

N,K=list(map(int,input().split()))
S = list(input())

for i in range(len(S)):
    if i != K-1:
        print(S[i],end='')
    else:
        print(chr(ord(S[i])+32),end="")
from math
X=int(input())
def ans165(X:int):
    cash=100#当初の預金額
    count=0
    while True:
        # cash=int(cash*1.01) #元本に１パーセントの利子をつけ小数点以下切り捨て
        # cash += cash // 100 # 元本に100で割った整数部を足す
        cash += math.floor(cash * 0.01)
        count += 1#利子をつける回数だけcountを増やす
        if cash>=X:#cashがXの値以上になったらループ終了
            break
    return count
print(ans165(X))

### FIXED CODE ###

def atc_165b(X: int) -> int:
    savings = 100
    years = 0

    while savings < X:
        years += 1
        # savings += savings * 0.01 * 100 // 100
        savings += savings // 100
    return years

X = int(input())
print(atc_165b(X))
from numba import jit
import sys
input = sys.stdin.readline


@jit
N, K = map(int, input().split())
A = list(map(int, input().split()))

for _ in range(K):
    B = [0]*(N+1)
    for i, a in enumerate(A):
        B[max(0, i-a)] += 1
        B[min(N, i+a+1)] -= 1
    for j in range(1, N):
        B[j] += B[j-1]
    if A == B[:-1]:
        A = B[:-1]
        break
    A = B[:-1]

ans = ' '.join(list(map(str, A)))
print(ans)


### FIXED CODE ###

from numba import jit
import sys
input = sys.stdin.readline


@jit
def main():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))

    for _ in range(K):
        B = [0]*(N+1)
        for i, a in enumerate(A):
            B[max(0, i-a)] += 1
            B[min(N, i+a+1)] -= 1
        for j in range(1, N):
            B[j] += B[j-1]
        if A == B[:-1]:
            A = B[:-1]
            break
        A = B[:-1]

    ans = ' '.join(list(map(str, A)))
    print(ans)


if __name__ == '__main__':
    main()
n = int(input())

if len(n) % 2 == 1:
  print('No')
else:
  a = n[0 : len(n)//2]
  b = n[len(n)//2 : len(n)]
  if a == b:
    print('Yes')
  else:
    print('No')

### FIXED CODE ###

n = int(input())
print(n**2)
n = int(input())
a = input().split( )

b = []
j = 0
k = 1

for i in range(n):
	if k == int(a[i]):
	b.append(int(a[i]))
	j += 1
	k += 1

if 0 == len(b):
	print(-1)
else:
	print(int(n)-len(b))

### FIXED CODE ###

n = int(input())
a = input().split( )

b = []
j = 0
k = 1

for i in range(n):
  if k == int(a[i]):
    b.append(int(a[i]))
    j += 1
    k += 1

if 0 == len(b):
  print(-1)
else:
  print(int(n)-len(b))
import fractions

n, k = map(int, input().split())
a = list(map(int, input().split()))

d = fractions.gcd(a[0], a[1])
for i in range(2, n):
    d = fractions.gcd(d, a[i])

ans = "IMPOSSIBLE"
for ai in a:
    if k <= ai and (ai - k) % d == 0:
        ans = "POSSIBLE"
        break
print(ans)

### FIXED CODE ###

import fractions

n, k = map(int, input().split())
a = list(map(int, input().split()))

ans = "IMPOSSIBLE"

d = a[0]
for i in range(1, n):
    d = fractions.gcd(d, a[i])

for ai in a:
    if k <= ai and (ai - k) % d == 0:
        ans = "POSSIBLE"
        break
print(ans)
a, b = int(raw_input())
if a > b:
	print "a > b"
elif a < b:
	print "a < b"
else:
	print "a == b"

### FIXED CODE ###

a, b = map(int, raw_input().split())
if a > b:
	print "a > b"
elif a < b:
	print "a < b"
else:
	print "a == b"
r=int(input())
print(R**2)

### FIXED CODE ###

r=int(input())
print(r**2)
N = int(input())
a = list(map(int,input().split()))

b = 0
 for i in range(0,N):
    b = b + 1/a[i]
print(1/b)

### FIXED CODE ###

N = int(input())
a = list(map(int,input().split()))
 
b = 0
for i in range(0,N):
    b = b + 1/a[i]
print(1/b)
null

### FIXED CODE ###

while 1:
  n, a, b, c, x = map(int, raw_input().split())
  if not n:
    break
  i = f = 0
  y = map(int, raw_input().split())
  while f <= 10000:
    if x == y[i]:
      i += 1
    x = (a * x + b) % c
    if i == n:
      print f
      break
    f += 1
  else:
    print -1
n, k = map(int, input().split())
h = list(map(int, input().split()))
H = sorted(h)[::-1]
ans = 0
if k >= len(h):
    print(0)
else:
    for i in H[k:]:
        ans += i
    print(ans)

### FIXED CODE ###

h, a = map(int,input().split())
print(-(-h // a))
n, a = map(int, input().split())
x = list(map(int, input().split()))
M = max(x)

dp = [[[0]*(n*M+1) for _ in range(n+1)] for _ in range(n+1)]
dp[0][0][0] = 1
for j in range(n):
    for k in range(n+1):
        for s in range(n*M+1):
            if dp[j][k][s]:
                dp[j+1][k][s] += dp[j][k][s]
                dp[j+1][k+1][s + x[j]] += dp[j][k][s]
 
ans = 0
for k in range(1, n+1):
    ans += dp[n][k][k*a]
print(ans)

### FIXED CODE ###

N, A = map(int, input().split())
X = list(map(lambda x: int(x) - A, input().split()))
maxn = max(max(X), A)
 
dp = [[0 for _ in range(2 * N * maxn + 1)] for _ in range(N + 1)]
dp[0][N * maxn] = 1
 
for i in range(N):
    for k in range(2 * N * maxn + 1):
        dp[i + 1][k] = dp[i][k]
        if 0 <= k - X[i] <= 2 * N * maxn:
            dp[i + 1][k] += dp[i][k - X[i]]
 
print(dp[N][N * maxn] - 1)
def harshad(x):
	sum = 0
	for i in range(0, len(x)):
		sum = sum + x[i]
	if int(x)%sum == 0: return 'Yes'
	else: return 'No'

print harshad(raw_input())

### FIXED CODE ###

def harshad(x):
	sum = 0
	for i in range(0, len(x)):
		sum = sum + int(x[i])
	if int(x)%sum == 0: return 'Yes'
	else: return 'No'

print harshad(raw_input())
MOD = 10**9 + 7
N,K= map(int,input().split())
A = list(map(int,input().split()))
A.sort()

if K == 1:
    print(0)
    exit()

n = 10000
fact = [1]*(n+1)
inv = [1]*(n+1)
ifact = [1]*(n+1)
for i in range(1,n+1):
    fact[i] = fact[i-1]*i % MOD
    inv[i] = pow(i,MOD-2,MOD)
    ifact[i] = ifact[i-1]*inv[i] % MOD

def nCr(n,r):
    return fact[n] * ifact[r] * ifact[n-r] % MOD

ans = 0
for l in range(N):
    for r in range(l+K-1,N):
        temp = (A[r]-A[l]) * nCr(r-l-1,K-2)
        ans = (ans + temp) % MOD

print(ans)






### FIXED CODE ###

MOD = 10**9 + 7
N,K= map(int,input().split())
A = list(map(int,input().split()))
#N = 100000
#K = 10
#A = list(range(N))

A.sort()

if K == 1:
    print(0)
    exit()

n = 100001
fact = [1]*(n+1)
inv = [1]*(n+1)
ifact = [1]*(n+1)
for i in range(1,n+1):
    fact[i] = (fact[i-1]*i) % MOD
    inv[i] = pow(i,MOD-2,MOD)
    ifact[i] = (ifact[i-1]*inv[i]) % MOD

def nCr(n,r):
    return (fact[n] * ifact[r] * ifact[n-r]) % MOD

ans = 0

for i in range(K-1,N):
    ans += A[i] * nCr(i,K-1)
    ans %= MOD

for i in range(N-K+1):
    ans -= A[i] * nCr(N-i-1,K-1)
    ans %= MOD

'''
for l in range(N):
    for r in range(l+K-1,N):
        temp = (A[r]-A[l]) * nCr(r-l-1,K-2)
        ans = (ans + temp) % MOD
        '''

print(ans)
from operator import mul
from functools import reduce

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

#a = cmb(n, r)

N, X, Y = map(int, input().split())
c = cmb(N, 2)
#A = [0 for i in range(c)]
#A = [[0 for i in range(2)] for j in range(c)]
#A[0][1] = 1
A = []
#print(A)


for i in range(N):
	for j in range(N):
		if j > i:
			A.append(j-i)

for i in range(N):
	for j in range(N):
		if range(X,Y) in range(i,j):
			A[i][j] = A[i][j] - (Y-X -1)

for i in range(N):
	for j in range(N):
		print(A[i][j])

"""
for i in range(c):
	for j in range(2):
		if i > j:
			A[i][j] = i - j
"""

"""
for i in range(2):
	for j in range(c):
		if j == (i+1):
			A[i][j] = 1
"""




### FIXED CODE ###

N, X, Y = map(int, input().split())

ans = [0] * (N-1)
for i in range(1,N+1):
	for j in range(i+1, N+1):
		k = min(j-i, abs(X-i) + abs(Y-j) + 1)
		ans[k-1] += 1

for i in range(N-1):
	print(ans[i])
N = input()
    a = "No"
    for n in N:
      if n == "7":
        a = "Yes"
    print (a)

### FIXED CODE ###

N = input ()
a = "No"
for n in N:
  if n == "7":
    a = "Yes"
print (a)
import math

def myfactorial(n):
  return math.factorial(n)

def combinations_count(n, r):
  return myfactorial(n) // (myfactorial(n - r) * myfactorial(r))

n, k = map(int, input().split())
for i in range(1, k+1):
  print(combinations_count(k-1, i-1) * combinations_count(n-k+1, i) % 1000000007) 

### FIXED CODE ###

import math

def myfactorial(n):
  return math.factorial(n)

def combinations_count(n, r):
  return (myfactorial(n) // (myfactorial(n - r) * myfactorial(r))) % 1000000007

n, k = map(int, input().split())
for i in range(1, k+1):
  if n-k+1 < i:
    print(0)
  else:
    print(combinations_count(k-1, i-1) * combinations_count(n-k+1, i) % 1000000007)
a,b,m=map(int, input().split())
rei=list(map(int, input().split())) 
den=list(map(int, input().split())) 
cou = [0] * m[2]
ans = []
for i in range(m[2]):
	cou[i]=list(map(int, input().split()))
	ans.append(rei[cou[i][0]-1]+den[cou[i][1]-1]-cou[i][2])
for i in range(b):
	for j in range(len(a):
		ans.append(rei[j]+den[i])
print(min(ans))

### FIXED CODE ###

m=list(map(int, input().split()))
rei=list(map(int, input().split())) 
den=list(map(int, input().split())) 
cou = [0] * m[2]
ans = []
for i in range(m[2]):
	cou[i]=list(map(int, input().split()))
	ans.append(rei[cou[i][0]-1]+den[cou[i][1]-1]-cou[i][2])

ans.append(min(rei)+min(den))
print(min(ans))
import collections
import copy
N = int(input())

cost = 0
diff_list = []
x_y_list = []

if N == 1:
    print(1)

for n in range(N):
    x, y = map(int, input().split())
    x_y_list.append((x, y))
    cost += 1

x_y_list_copy = copy.copy(x_y_list)

for n in range(N):
    x_y = x_y_list.pop()
    x = x_y[0]
    y = x_y[1]
    for tmp_x, tmp_y in x_y_list:
        diff_list.append((x - tmp_x, y - tmp_y))

for n in range(N):
    x_y = x_y_list_copy.pop(0)
    x = x_y[0]
    y = x_y[1]
    for tmp_x, tmp_y in x_y_list_copy:
        diff_list.append((x - tmp_x, y - tmp_y))

counter = collections.Counter(diff_list)
print(cost - max(counter.values()))

### FIXED CODE ###

import collections
import copy
import sys
N = int(input())

cost = 0
diff_list = []
x_y_list = []

if N == 1:
    print(1)
    sys.exit()

for n in range(N):
    x, y = map(int, input().split())
    x_y_list.append((x, y))
    cost += 1

x_y_list_copy = copy.copy(x_y_list)

for n in range(N):
    x_y = x_y_list.pop()
    x = x_y[0]
    y = x_y[1]
    for tmp_x, tmp_y in x_y_list:
        diff_list.append((x - tmp_x, y - tmp_y))

for n in range(N):
    x_y = x_y_list_copy.pop(0)
    x = x_y[0]
    y = x_y[1]
    for tmp_x, tmp_y in x_y_list_copy:
        diff_list.append((x - tmp_x, y - tmp_y))

counter = collections.Counter(diff_list)
print(cost - max(counter.values()))
a, b, c = map(int, input().split())
flag = True
count = 0
while flag:
  if c <= count || b - a < 0:
    break
  b -= a
  count += 1
print(count)

### FIXED CODE ###

import math
a, b, c = map(int, input().split())
D = b / a
if a > b:
    print(0)
elif D == c:
    print(c)
elif D > c:
    if c > D:
        print(math.floor(D))
    else:
        print(c)
else:
    print(math.floor(D))
import numpy as np
from scipy.ndimage.interpolation import shift
h, w = map(int, input().split())
a = np.array([[c == "#" for c in input()] for _ in range(h)], dtype=bool)
cnt = 0
while a.all() == False:
    a = a + shift(a, [0, -1], order=1, cval=False) \
        + shift(a, [0, 1], order=1, cval=False) \
        + shift(a, [1, 0], order=1, cval=False) \
        + shift(a, [-1, 0], order=1, cval=False)
    cnt += 1
print(cnt)

### FIXED CODE ###

from collections import deque

h, w = map(int, input().split())
cm = [[0 for j in range(w + 2)] for i in range(h + 2)]
que = deque([])
for i in range(1, h + 1):
    s = input()
    for j in range(1, w + 1):
        if s[j - 1] == ".":
            cm[i][j] = -1
        else:
            que.append(i)
            que.append(j)
ans = 0
while len(que) > 0:
    y = que.popleft()
    x = que.popleft()
    ans = cm[y][x] + 1
    if cm[y + 1][x] == -1:
        cm[y + 1][x] = ans
        que.append(y + 1)
        que.append(x)
    if cm[y - 1][x] == -1:
        cm[y - 1][x] = ans
        que.append(y - 1)
        que.append(x)
    if cm[y][x + 1] == -1:
        cm[y][x + 1] = ans
        que.append(y)
        que.append(x + 1)
    if cm[y][x - 1] == -1:
        cm[y][x - 1] = ans
        que.append(y)
        que.append(x - 1)
print(ans - 1)
N = int(input())
A=list(map(int, input().split()))

def sol(i,want):
    num=int(N/(i+1))
    wa=-A[0]
    for j in range(num):
        wa+=A[i+j*i]
    wa=wa%2
    if wa==want:
        x=0
    else:
        x=1
#     print(num)
    return x 

B=A[:]
for i in range(half):
    j=half-1-i
#     print(j)
    B[j]=sol(j,A[j])
m=sum(B)
print(m)
for i in range(N):
    if B[i]==1:
        print(i+1)



### FIXED CODE ###

N = int(input())
A=list(map(int, input().split()))




def sol(i,want):
    num=N//(i+1)
    wa=B[i]

    for j in range(num):
        k=i+j*(i+1)
        wa+=B[k]
#         print(i,wa,B[i])
#         print((i+1)+j*(i+1)-1)
#     print(i,wa,B[i])
    wa=wa%2
#     print(i,wa,A[i])
    
    if wa==want:
        x=0
    else:
        x=1
#     print(num)
    return x 

B=A[:]
half=N//2
for i in range(half):
    j=half-1-i
#     print(j)
    B[j]=sol(j,A[j])
    
C=[i+1 for i, x in enumerate(B) if x ==1]

m=sum(B)
print(m)
print(*C)
cards = ([False in i in range(13)] for j in range(4))
pattern = ['S','H','C','D']

n = int(input())

for i in range(n):
  x, y = input().split()
  y = int(y)
  cards = [pattern.index(x)][y-1] = True
  
for i in range(4):
  for j in range(13):
    if cards[i][j] == False:
      print(pattern[i][j-1])


### FIXED CODE ###

n = int(input())
card =[i+" "+str(j) for i in ["S","H","C","D"] for j in range(1,14)]
for i in range(n):
    card.remove(input())
for i in card:
    print(i)
a,b,k=map(int,input().split())
if b-a+1<=2k:
    for i in range(a,b+1):
        print(i)
else:
    for j in range(k):
        print(a+j)
    for l in range(k):
        print(b-k+1+l)

        

### FIXED CODE ###

a,b,k=map(int,input().split())
if b-a+1<=2*k:
    for i in range(a,b+1):
        print(i)
else:
    for j in range(k):
        print(a+j)
    for l in range(k):
        print(b-k+1+l)
a = int(input())
print(a+a*a)(a*a*a)

### FIXED CODE ###

a = int(input())
print(a+(a*a)+(a*a*a))
S = str(input())
s = input()
for i in range(len(s)):
    for j in range(i, len(s)):
        a = s[:i] + s[j:]
        if a == "keyence":
            print("YES")
            exit()
print("NO")


### FIXED CODE ###

s = str(input())
for i in range(len(s)):
    for j in range(i, len(s)):
        a = s[:i] + s[j:]
        if a == "keyence":
            print("YES")
            exit()
print("NO")
P=[]
C=[]
point=1000 
D,G=map(int,input().split())
for i in range(D):
    p,c= map(int,input().split())
    P.append(p)
    C.append(c)

for i in range(2**D) :
    score=0
    solve=0
    needproblem=0
    for j in range(D) :            
        if (i>>j) & 1 :
            score+=P[j]*100*(j+1)+C[j]
            solve+=P[j]
        if (~i>>j) & 1 :                
            needproblem=j+1
    if score>G :
        point=min(point,solve)

    elif score<=G :                
        needsolve=(G-score)//(needproblem*100)
        if needsolve>P[needproblem-1] :  
            continue
        elif needsolve<=P[needproblem-1] :
            resolve=solve+needsolve
            point=min(point,resolve)
print(point)

### FIXED CODE ###

D,G=map(int,input().split())
# bit全探索で、全問解く問題の組み合わせをすべて試す
 
scores=[None]*D
for i in range(D):
  p,c=map(int,input().split())
  # 一問の得点、問題数、ボーナス、全てといたときの得点
  scores[i]=[(i+1)*100,p,c,((i+1)*100)*p+c]
 
# あとあとのために点数高い順に並べる
scores=sorted(scores,key=lambda x:x[0])[::-1]
 
# 全問とく組み合わせに対して、最小の問題数
ans=D*100
for i in range(2**D):
  total=0
  solve=0
  for j in range(D):
    if (i>>j)&1:
      # 全問とく問題のボーナスを足していく
      total+=scores[j][3]
      solve+=scores[j][1]
  if total>=G:
    if ans>solve:
      ans=solve
    continue
  rest=G-total
  for j in range(D):
    if (i>>j)&1==0:
      point=scores[j][0]
      num=scores[j][1]-1 # 全問とかないので1減らす
      if point*num<rest:
        rest-=point*num
        solve+=num
      else:
        solve+=(rest//point+(rest%point>0))
        rest=0
    if rest<=0 and ans>solve:
      ans=solve
  
print(ans)
print a, b

### FIXED CODE ###

a, b = map(int, raw_input().split())
print a*b, (a+b)*2
N=int(input())
xy=[list(map(int,input().split())) for _ in range(N)]

from collections import Counter
list_=[]

for i in range(N):
    for j in range(i+1,N):
        list_.append((xy[i][0]-xy[j][0],xy[i][1]-xy[j][1]))

print(N-Counter(list_).most_common()[0][1])

### FIXED CODE ###

N=int(input())
xy=[list(map(int,input().split())) for _ in range(N)]

from collections import Counter
list_=[]

for i in range(N):
    for j in range(i+1,N):
        if xy[i][0]-xy[j][0]==0:
            list_.append(((xy[i][0]-xy[j][0]),abs(xy[i][1]-xy[j][1])))
        elif xy[i][0]-xy[j][0]<0:
            list_.append((-(xy[i][0]-xy[j][0]),-(xy[i][1]-xy[j][1])))
        else:
            list_.append((xy[i][0]-xy[j][0],xy[i][1]-xy[j][1]))

if N==1:
    print(1)
else:
    print(N-Counter(list_).most_common()[0][1])