Harryxun/stf_run huggingface dataset:
s=input()
t=input()
s.sort()
t.sort(reverse=True)
for i in range(min(len(s,t))):
  if ord(s[i])==ord(t[i]):
    continue
  elif ord(s[i])<ord(s[i]):
    print("Yes")
    break
  else:
    print("No")
else:
  print("No")

### FIXED CODE ###

s=list(input())
t=list(input())
s.sort()
t.sort(reverse=True)
s="".join(s)
t="".join(t)
for i in range(min(len(s),len(t))):
  if ord(s[i])==ord(t[i]):
    continue
  elif ord(s[i])<ord(t[i]):
    print("Yes")
    break
  else:
    print("No")
    break
else:
  if len(s)<len(t):
    print("Yes")
  else:
    print("No")
from sys import setrecursionlimit
setrecursionlimit(1000000)
def l_in(type_): return list(map(type_, input().split()))
def i_in(): return int(input())
def m_in(type_): return map(type_, input().split())
def r_in(n, type_): return [type_(input()) for _ in range(n)]

n, m = m_in(int)
ab = [list(m_in(int)) for _ in range(m)]

nodes = [i for i in range(n)]
for a, b in ab:
    nodes.pop(b-1)

ans = len(nodes)-1

print(ans)


### FIXED CODE ###

from sys import setrecursionlimit
from collections import Counter
import networkx as nx
setrecursionlimit(1000000)
def l_in(type_): return list(map(type_, input().split()))
def i_in(): return int(input())
def m_in(type_): return map(type_, input().split())
def r_in(n, type_): return [type_(input()) for _ in range(n)]

def find_components(n, connectors):
    g = nx.Graph()
    for i in range(n): g.add_node(i+1)
    g.add_edges_from(connectors)
    return len(list(nx.connected_components(g)))


n, m = m_in(int)
ab = [list(m_in(int)) for _ in range(m)]

ans = find_components(n, ab) - 1

print(ans)
N = int(input())
if N == 1:
	print("Hello World")
else:
	A, B = map(int, input().split())
	print(A + B)


### FIXED CODE ###

N = int(input())
if N == 1:
	print("Hello World")
else:
	A, B = [int(input()) for i in range(2)]
	print(A + B)
n = int(input())
A = [0]*n
for i in range(n):
    A[i]=int(input())
count = 0
f = True
while(True):
    flag = True
    for i in range(n):
        if A[i]%2 !=0:
            flag=False
    if flag == False:
        break
    for i in range(n):
        if A[i]%2 == 0:
            A[i]/=2
    count+=1
print(count)

### FIXED CODE ###

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

count = 0
f = True
while(True):
    flag = True
    for i in range(n):
        if A[i]%2 !=0:
            flag=False
    if flag == False:
        break
    for i in range(n):
        if A[i]%2 == 0:
            A[i]/=2
    count+=1
print(count)
n,k = map(int,input())
print(n-k+1)

### FIXED CODE ###

n,k = map(int,input().split())
print(n-k+1)
scores=[]
stamp=[]
def depth(now,score,d):
    global scores,stamp
    stamp.append(now)
    if d[now]:
        for i in d[now]:
            depth(i,score+1,d)
        return 
    else:
        scores.append(score)
        return 


N,M=map(int,input().split())
d=[[] for i in range(N)]
for i in range(M):
    x,y=map(int,input().split())
    d[x-1].append(y-1)

Max=0
for i in range(N):
    if not(i in stamp):
        depth(i,0,d)
        if scores and max(scores)>Max:
            Max=max(scores)
        scores=[]
print(Max)



### FIXED CODE ###

import numpy as np
import sys
sys.setrecursionlimit(100000)
N,M=map(int,input().split())
d=[[] for i in range(N)]
for i in range(M):
    x,y=map(int,input().split())
    d[x-1].append(y-1)
dp=[0 for i in range(N)]

def depth(now,score,d):
    global dp
    if dp[now]==0 or not(dp[now]):
        if d[now]:
            _score=[]
            for i in d[now]:
                _score.append(depth(i,score+1,d)-score)
            dp[now]=max(_score)
        else:
            return score

        return dp[now]+score

    else:
        return dp[now]+score



Max=0
for i in range(N):
    m=depth(i,0,d)
    if  m>Max:            
        Max=m
print(Max)
a = input()
	b???= input()
	print(int(a) * int(b))
	print((int(a) * 2) + (int(b) * 2))

### FIXED CODE ###

a ,b = input().split(' ')
print(int(a) * int(b),(int(a) * 2) + (int(b) * 2))
s=input()
n=len(s)

def rle(string):
    tmp = string[0]
    cnt = 1
    ans = ''
    for i in range(1, len(string)):
        if tmp == string[i]:
            cnt += 1
        else:
            ans += tmp+str(cnt)
            tmp = string[i]
            cnt = 1
    ans += (tmp+str(cnt))
    return ans


rle_s=list(rle(s))

ans=[0]*n
sum_cnt=0

for i in range(0,len(rle_s),4):
    r_num=int(rle_s[i+1])
    l_num=int(rle_s[i+3])
    odd_num=r_num//2+(l_num+1)//2
    even_num=r_num+l_num-odd_num

    ans[sum_cnt+r_num-1]=even_num
    ans[sum_cnt+r_num]=odd_num

    sum_cnt+=(r_num+l_num)
    # print(r_num, l_num, odd_num, even_num, sum_cnt)

print(*ans)


### FIXED CODE ###

s=input()
n=len(s)

def rle(string):
    tmp = string[0]
    cnt = 1
    ans = []
    for i in range(1, len(string)):
        if tmp == string[i]:
            cnt += 1
        else:
            ans.append(tmp)
            ans.append(cnt)
            tmp = string[i]
            cnt = 1
    ans.append(tmp)
    ans.append(cnt)
    return ans

rle_s=list(rle(s))
# print(rle_s)
ans=[0]*n
sum_cnt=0

for i in range(0,len(rle_s),4):
    r_num=int(rle_s[i+1])
    l_num=int(rle_s[i+3])
    odd_num=r_num//2+(l_num+1)//2
    even_num=r_num+l_num-odd_num

    ans[sum_cnt+r_num-1]=even_num
    ans[sum_cnt+r_num]=odd_num

    sum_cnt+=(r_num+l_num)
    # print(r_num, l_num, odd_num, even_num, sum_cnt)

print(*ans)
#Biscuits

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

#奇数の数
k = 0
for a in A:
    if a%2 ==1:
        k+=1

if ( k ==0 ):
    ans = int(p==0)
else:
    ans = 2**(N-1)
print(ans)

### FIXED CODE ###

#Biscuits

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

#奇数の数
k = 0
for a in A:
    k += a%2
if ( k ==0 ):
    ans = (3-P)%2 * 2**N
else:
    ans = 2**(N-1)
print(ans)
N,Q = map(int,input().split())
S = input()
place = []
for s in range(N - 1):
	if S[s] == 'A':
		if S[s + 1] == 'C':
			place.append(s)
PlaceCount = len(place)
for q in range(Q):
    num = 0
	l,r = map(int,input().split())
	l -= 1
	r -= 2
	for i in range(PlaceCount):
		if l <= place[i] <= r:
			num += 1
	print(num)

### FIXED CODE ###

N,Q = map(int,input().split())
S = input()
r = [0 for n in range(N)]
l = [0 for n in range(N)]
cnt = 0
for s in range(N - 1):
	if S[s] == 'A':
		if S[s + 1] == 'C':
			cnt += 1
	l[s + 1] = cnt
cnt = 0
for s in range(1,N):
	if S[-s] == 'C':
		if S[-s - 1] == 'A':
			cnt += 1
	r[-s - 1] = cnt
for q in range(Q):
	L,R = map(int,input().split())
	print(cnt - l[L - 1] - r[R - 1])
if '557' == ''.join(sorted(input().split())):
    return 'YES'
else:
    return 'NO'


### FIXED CODE ###

res = 'YES' if '557' == ''.join(sorted(input().split())) else 'NO'
print(res)
N = int(input())

A = []
for i in range(N):
    A.append(list(map(int,input().split())))
B = []
for i in range(N):
    B.append(list(map(int,input().split())))
C = []
for i in range(N-1):
    C.append(list(map(int,input().split())))

ans = 0
before = 9999
for i in range(N):
    ans += B[A[i]-1]
    if A[i]==before + 1:
        ans += c[i-1]

print(ans)

### FIXED CODE ###

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

ans = 0
before = 9999
for i in range(N):
    ans += B[A[i]-1]
    if A[i]== (before+1):
        ans += C[A[i]-2]
    before = A[i]

print(ans)
l= map(int, input().split())
ans = sum(l) - max(l)
print(ans)

### FIXED CODE ###

l= list(map(int, input().split()))
ans = sum(l) - max(l)
print(ans)
#N=int(input())
pages=N // 2
if N % 2==0:
  	pass
  else:
    pages=pages+1
print(pages)

### FIXED CODE ###

N=int(input())
pages=N // 2
if N % 2==0:
        pass
else:
    pages=pages+1
print(pages)
import sys
def input():
    return sys.stdin.readline()[:-1]
a, b= input().split()
a = int(a)

# floatをそのまま掛け算すると精度が足りずに誤差が生じるため、.を消してintにする。
# b = int(b.replace(".", ""))
# もしくは普通に* 100でもよい
b = int(b * 100)

output = a * b // 100
# 小数点は2桁までで確定なので、100で切り捨て除算する。
print(output)


### FIXED CODE ###

import sys
def input():
    return sys.stdin.readline()[:-1]
a, b= input().split()
a = int(a)
b = int(b.replace(".", ""))
# floatをそのまま掛け算すると大きい計算で誤差が生じるため、.を消してintにする。
output = a * b // 100
# 小数点は2桁までで確定なので、100で切り捨て除算する。
print(output)
def main():
    import sys
    from bisect import bisect_left
    N,K=list(map(int,sys.stdin.readline().split()))
    A=[0]*N
    for i in range(N):
        A[i]=int(sys.stdin.readline())

    dp=[0]*(N+1)
    dp[0]=1
    if abs(A[0]-A[1])<=K:
        dp[1]=2
    else:
        dp[1]=1
    
    for i in range(2,N):
        mx=-1
        for j in range(1,100):
            if abs(A[i-j]-A[i])<=K:
                mx=max(mx,dp[i-2]+1)

        dp[i]=mx        

    print(max(dp))


main()

### FIXED CODE ###

def main():
    import sys
    from bisect import bisect_left
    N,K=list(map(int,sys.stdin.readline().split()))
    A=[0]*N
    for i in range(N):
        A[i]=int(sys.stdin.readline())

    dp=[0]*(N+1)
    dp[0]=1
    if abs(A[0]-A[1])<=K:
        dp[1]=2
    else:
        dp[1]=1
    
    for i in range(2,N):
        mx=1
        for j in range(1,105):
            if i-j<0:
                break
            if abs(A[i-j]-A[i])<=K:
                mx=max(mx,dp[i-j]+1)

        dp[i]=mx

    print(max(dp))


main()
N = int(input())
A = input().split()
A = [int(n) for n in A]
for i in range(N):
  count = 0
  for j in range(N-1):
	if i+1 == A[j]:
	  count += 1
  print(count)


### FIXED CODE ###

N = int(input())
A =[int(n) for n in input().split()]
b = [0]*N
for i in A:
  b[i-1]+=1
for i in range(N):
  print(b[i])
import sys
import itertools

def sieve(n):
    is_prime = [True] * (n + 1)
    prime_list = []
    
    is_prime[0] = is_prime[1] = False
    prime_list.append(2)
    
    for i in range(3, n + 1, 2):
        if is_prime[i]: prime_list.append(i)
        for j in range(i * i, n + 1, i):
            is_prime[j] = False
    return prime_list
    
primes = sieve(40000)

def factoriaztion(n):
    ret = []
    for prime in primes:
        while n % prime == 0:
            ret.append(prime)
            n /= prime
        if n == 1: break
    if n > 1: ret.append((n, 1))
    return ret
    
    
if __name__ == '__main__':
    n = sys.stdin.readline()
    n = int(n)
    factors = factoriaztion(n)
    factors = itertools.groupby(factors)
    
    ans = 1
    
    for k, v in factors:
        l = len(list(v))
        ans = ans * (k ** l - k ** (l - 1))
    
    sys.stdout.write(str(ans) + '\n')
    
        

### FIXED CODE ###

import sys
import itertools

def extend_gcd(a, b):
    if b == 0:
        return (1, 0, a)
    else:
        (a1, b1, g) = extend_gcd(b, a % b)
        return (b1, a1 - (a // b) * b1, g)
    
    
if __name__ == '__main__':
    line = sys.stdin.readline()
    a,b = line.split()
    a,b = int(a), int(b)
    
    (x, y, g) = extend_gcd(a, b)
    
    
    sys.stdout.write(str(x) + ' '  + str(y) +  '\n')
N,K=map(int,input().split())
A=list(map(int,input().split()))
done=[0 for _ in range(N)]
done[0]=1
W=[0]
loop=0
city=0
for i in range(N):
    if done[A[i]-1]==2:
        init=W.index(A[i]-1)
        loop=i-init
        break
    city=A[city]-1
    W.append(city)
    done[city]+=1

print(W[(K-init)%loop+init]+1)

### FIXED CODE ###

N,K=map(int,input().split())
A=list(map(int,input().split()))
done=[-1 for _ in range(N)]
done[0]=0
n=0
now=0
init=0
loop=N
log=[0]

while n<N:
    log.append(A[log[-1]]-1)
    n+=1
    if done[log[-1]]>-1:
        init=done[log[-1]]
        loop=n-done[log[-1]]
        break
    done[log[-1]]=n

if K<init:
    print(log[K]+1)
else:
    num=init+(K-init)%loop
    print(log[num]+1)
N = int(input())
X = list(map(int,input().split()))
M = N//2
m = (N-1)//2
for i in range(N):
    if i <= M:
        print(A[m+1])
    else:
        print(A[m])

### FIXED CODE ###

N = int(input())
X = list(map(int,input().split()))
Y = sorted(X)
M = Y[N//2]
if N%2==1:
    M2 = Y[N//2 + 1]
    for i in range(N):
        if X[i] > M:
            print(M)
        else:
            print(M2)
else:
    M2 = Y[N//2 - 1]
    for i in range(N):
        if X[i] < M:
            print(M)
        else:
            print(M2)
def f_takahashi_basics_in_education_and_learning(L, A, B, M, DIGIT_MAX=18):
    import numpy
    # 数列に対して、d桁の要素の個数を求める
    num_pow_d = [0] * (DIGIT_MAX + 1)
    for d in range(DIGIT_MAX + 1):
        if 10**d - 1 < A:
            continue
        # dに対してA + B*n <= 10**d - 1 となる最大のn(L以下しか取りえない)
        num_pow_d[d] = min(((10**d - 1 - A) // B) + 1, L)  # +1はnが0スタートのため

    ans = 0
    array = numpy.array([0, A, 1])
    for d in range(1, DIGIT_MAX + 1):
        c_d = num_pow_d[d] - num_pow_d[d - 1]
        matrix = numpy.array([[(10**d), 0, 0], [1, 1, 0], [0, B, 1]], dtype='object')
        array = numpy.dot(array, numpy.linalg.matrix_power(matrix, c_d))
        array %= M
    return array[0]

L, A, B, M = [int(i) for i in input().split()]
print(f_takahashi_basics_in_education_and_learning(L, A, B, M))

### FIXED CODE ###

def f_takahashi_basics_in_education_and_learning(L, A, B, M, DIGIT_MAX=18):
    """numpyの行列演算だと L, A, B が 10**18 程度のときうまく動作しない"""
    def identity_matrix(n):
        """n×n単位行列"""
        return [[int(i == j) for i in range(n)] for j in range(n)]

    def multiply(a, b):
        """行列a, bの積"""
        row = len(a)
        col = len(b[0])
        t = len(b)
        ret = [[0] * col for _ in range(row)]
        for i in range(row):
            for j in range(col):
                for k in range(t):
                    ret[i][j] += a[i][k] * b[k][j]
        for i in range(row):
            for j in range(col):
                ret[i][j] %= M
        return ret

    def power(a, k):
        """行列aのk乗"""
        n = len(a)
        ret = identity_matrix(n)
        while k:
            if k & 1:
                ret = multiply(ret, a)
            a = multiply(a, a)
            k >>= 1
        return ret
 
    # 数列に対して、d桁の要素の個数を求める
    num_pow_d = [0] * (DIGIT_MAX + 1)
    for d in range(DIGIT_MAX + 1):
        if 10**d - 1 < A:
            continue
        # dに対してA + B*n <= 10**d - 1 となる最大のn(L以下しか取りえない)
        num_pow_d[d] = min(((10**d - 1 - A) // B) + 1, L)  # +1はnが0スタートのため
    ans = 0
    array = [[0, A, 1]]
    for d in range(1, DIGIT_MAX + 1):
        c_d = num_pow_d[d] - num_pow_d[d - 1]
        matrix = [[10**d, 0, 0], [1, 1, 0], [0, B, 1]]
        array = multiply(array, power(matrix, c_d))
    return array[0][0]

L, A, B, M = [int(i) for i in input().split()]
print(f_takahashi_basics_in_education_and_learning(L, A, B, M))
def step(n, memo={}):
    if n <= 1:
        return 1
    elif n == 2:
        return 2
    elif n in memo:
        return memo[n]%1000000007
    else:
        memo[n] = (step(n-1,memo)+step(n-2,memo))%1000000007
        return memo[n]

N, M = map(int, input().split())
a = [-1]

for m in range(M):
    a.append(int(input()))
    if a[m+1] - a[m] == 1:
        print(0)
        break
else:
    a.append(N+1)
    ans = 1
    for m in range(M+1):
        ans = (ans*(step(a[m+1]-a[m]-2)))%1000000007
    print(ans)

### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)

def step(n, memo={}):
    if n <= 1:
        return 1
    elif n == 2:
        return 2
    elif n in memo:
        return memo[n]
    else:
        memo[n] = (step(n-1,memo)+step(n-2,memo))%1000000007
        return memo[n]

N, M = map(int, input().split())
a = [-1]

if M == 0:
    print(step(N))

else:
    for m in range(M):
        a.append(int(input()))
        if a[m+1] - a[m] == 1:
            print(0)
            break
    else:
        a.append(N+1)
        ans = 1
        for m in range(M+1):
            ans = (ans*(step(a[m+1]-a[m]-2)))%1000000007
        print(ans)
N=int(input())
A=map(int,input().split())
s=sum(1/i) for i in A
t=1/s
print(t)

### FIXED CODE ###

N=int(input())
A=map(int,input().split())
s=sum(1/i for i in A)
t=1/s
print(t)
max = 0
for letter in S:
    if letter == "R":
        max += 1
    if letter == "S":
        break 
print(max)

### FIXED CODE ###

S = input()

l = len(S)
count = 0

for i in range(l):
    if "R" not in S:
        break
    cur_count = 1

    for j in range(i+1,l):
        if S[i] == "S":
            break
        if (S[i] != S[j]):
            break
        cur_count += 1
    if cur_count > count:
        count = cur_count

print(count)
from collections import defaultdict
import sys
sys.setrecursionlimit(10000)
n = int(input())
s = [list(map(int,input().split())) for i in range(n-1)]
t = defaultdict(list)
for i in range(n-1):
    p = [s[i][1],s[i][2]]
    q = [s[i][0],s[i][2]]
    t[s[i][0]] += [p]
    t[s[i][1]] += [q]

a = [-1]*n
a[0] = 0

def Tree(dic,a,x,lo):
    for i in range(len(dic[x])):
        if a[dic[x][i][0]-1] != -1:
            continue
        else:
            save = lo
            lo += dic[x][i][1]
            a[dic[x][i][0]-1] = lo
            a = Tree(dic,a,dic[x][i][0],lo)
            lo = save
    return a

lis = Tree(t,a,1,0)
for i in range(n):
    if lis[i] % 2 == 0:
        print(0)
    else:
        print(1)

### FIXED CODE ###

from collections import defaultdict
import sys
sys.setrecursionlimit(1000000)

n = int(input())
s = [list(map(int,input().split())) for i in range(n-1)]
t = defaultdict(list)
for i in range(n-1):
    p = [s[i][1],s[i][2]]
    q = [s[i][0],s[i][2]]
    t[s[i][0]] += [p]
    t[s[i][1]] += [q]

a = [-1]*n
a[0] = 0

def Tree(dic,a,x,lo):
    for i in range(len(dic[x])):
        if a[dic[x][i][0]-1] != -1:
            continue
        else:
            save = lo
            lo += dic[x][i][1]
            a[dic[x][i][0]-1] = lo
            a = Tree(dic,a,dic[x][i][0],lo)
            lo = save
    return a

lis = Tree(t,a,1,0)
for i in range(n):
    if lis[i] % 2 == 0:
        print(0)
    else:
        print(1)
ir=int(input())
print(r*r*3.14, 2*r*3.14)

### FIXED CODE ###

import math
r = float(input())
print(r**2*math.pi, 2*r*math.pi)
import math

A, B, C, D = map(int, input().split())

cnt = B//C -(A - 1)//C + B//D - (A - 1)//D - ((B//((C * D) // math.gcd(C, D))) - (A - 1)//((C * D) // math.gcd(C, D)))
cnt1 = B - (A - 1) -cnt

print(cnt1)

### FIXED CODE ###

from fractions import gcd

A, B, C, D = map(int, input().split())

cnt = B//C -(A - 1)//C + B//D - (A - 1)//D - ((B//((C * D) // gcd(C, D))) - (A - 1)//((C * D) // gcd(C, D)))
cnt1 = B - (A - 1) -cnt

print(cnt1)
import sys
read = sys.stdin.read
#readlines = sys.stdin.readlines
from collections import defaultdict

def main():
    def from10to2(p):
        res = []
        while p:
            p, t = divmod(p, 2)
            res.append(str(t))
        return "".join(res[::-1])

    def from2to10(p):
        res = 0
        num2 = 1
        for c in p[::-1]:
            if c == '1':
                res += num2
            num2 *= 2
        return res

    def f(p):
        if p == 0:
            return 0
        elif d1[p] > 0:
            return d1[p]
        else:
            ppop = from10to2(p).count('1')
            p2 = p % ppop
            fp = f(p2) + 1
            d1[p] = fp
            return fp

    n = int(input())
    x = list(input())

    bin2 = [0] * n
    num2 = 1
    for i1 in range(1, n+1):
        bin2[-i1] = num2
        num2 *= 2
    numof1 = x.count('1')
    xas10 = from2to10(x)
    d1 = defaultdict(int)
    d1[0] = 0
    for j1 in range(n):
        if x[j1] == '1':
            print(f((xas10 - bin2[j1]) % (numof1 - 1)) + 1)
        else:
            print(f((xas10 + bin2[j1]) % (numof1 + 1)) + 1)

if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys
read = sys.stdin.read
from collections import defaultdict
def main():
    n = int(input())
    x = list(input())
    # 0除算よけ。
    if n == 1:
        if x[0] == '1':
            print(0)
        else:
            print(1)
        sys.exit()
    # xの10進数換算と１の数カウント。
    x10 = int("".join(x), 2)
    xcount1 = x.count('1')
    # 2**i(mod 1の数)をケースごとに用意する。
    mod2plus = [0] * n
    mod2plus[0] = (1 % (xcount1+1)) # 必ず1になる。xcount1=0はありえない。
    for j1 in range(1, n):
        mod2plus[j1] = (mod2plus[j1 - 1] * 2) % (xcount1+1)
    mod2minus = [0] * n
    if xcount1 > 1:
        mod2minus[0] = 1
        for j1 in range(1, n):
            mod2minus[j1] = (mod2minus[j1 - 1] * 2) % (xcount1-1)
    # x(mod 1の数)をケースごとに用意する。
    modx_plus = x10 % (xcount1 + 1)
    if xcount1 == 1:
        modx_minus = 0
    else:
        modx_minus = x10 % (xcount1 - 1)
    popcount = defaultdict(int)
    for i1 in range(n):
        if x[i1] == '1':
            if xcount1 == 1:
                print(0)
                continue
            else:
                x3 = modx_minus - mod2minus[n - 1 - i1]
                if x3 < 0:
                    x3 += (xcount1 - 1)
                elif x3 > (xcount1 - 1):
                    x3 -= (xcount1 - 1)
                elif x3 == (xcount1 - 1):
                    print(1)
                    continue
        else:
            x3 = modx_plus + mod2plus[n - 1 - i1]
            if x3 < 0:
                x3 += (xcount1 + 1)
            elif x3 > (xcount1 + 1):
                x3 -= (xcount1 + 1)
            elif x3 == (xcount1 + 1):
                print(1)
                continue
        r = 1
        while x3:
            r += 1
            if popcount[x3] == 0:
                p = bin(x3).count('1')
                popcount[x3] = p
                x3 = x3 % p
            else:
                x3 = x3 % popcount[x3]
        print(r)

if __name__ == '__main__':
    main()
D=["SUN","MON","TUE","WED","THU","FRY","SAT"]
S=input(int())

print(7-D.index(D))

### FIXED CODE ###

D=["SUN","MON","TUE","WED","THU","FRI","SAT"]
S=input()

print(7-D.index(S))
n = int(input())
while n > 0:
    a += n
    n -= 1
print(a)


### FIXED CODE ###

n = int(input())
a = 0
while n > 0:
    a += n
    n -= 1
print(a)
N = input()
S,T = input().split()
 
a = ""
for i in range(N):
  a+=S[i]+T[i]
print(a)

### FIXED CODE ###

a = input()
b = input()
 
answer_list = ["1","2","3"]
answer_list.remove(a)
answer_list.remove(b)
 
print(answer_list[0])
n = int(input())
p = list(map(int, input().split()))
st = []
c = 0
for i in range(0,n):
    if (p[i] == i+1):
        st.append(1)
    else:
        st.append(0)
def cal(a):
    global c
    for j in range(a,n-1):
        if (st[j] == 1 and  st[j+1]==1):
            c += 1
            cal(j+2)
    return c
           
x = cal(0)
y = st.count(1)
print(y-x)
        

### FIXED CODE ###

n = int(input())
p = list(map(int, input().split()))
st = []
c = 0
for i in range(0,n):
    if (p[i] == i+1):
        st.append(1)
    else:
        st.append(0)
def cal(a):   
    global c    
    if (st[a]== 1 and  st[a+1]==1):
        c += 1
        return a+2
    return a+1
p=0           
while (p < n-1):
    p = cal(p)
    
y = st.count(1)
print(y-c)
a=input()
b=input()
if (a>b):
 print'a>b'
if (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"
def check(t):
    return 1 if t is '#' else 0
    
def main(H, W, S):
    for i in range(H):
        for j in range(W):
            if S[i][j] is '.':
                S[i][j] = check(S[i][max(j-1, 0)]) + check(S[i][min(j+1, W-1)]) + check(S[max(i-1, 0)][j]) + check(S[min(i+1, H-1)][j])
    return S


H, W = map(int, input().split())
S = [input().split() for i in H]
print(main(H, W, S))

### FIXED CODE ###

def main(argv):
    for i in range(len(argv)):
        check = sum(argv[i] == argv[j] for j in range(len(argv)))
        if check != len(argv)-1:
            return argv[i]


argv = list(map(int, input().split()))
print(main(argv))
ans = 0
N = int(input())
array = list(map(int, input().split()))
x = sum(array)
for i in range(N):
    ans += array[i] * (x -arrau[i])
print(int(ans/2)%(10**9+7))

### FIXED CODE ###

ans = 0
N = int(input())
array = list(map(int, input().split()))
x = sum(array)
y = 0
for i in range(N):
  y += array[i]**2

ans = x**2 -y
print((ans//2)%(10**9+7))
N = int(input())
K = int(input())
X = list(map(int,input().split()))

answer = 0

for x in X:
  answer += min(abs(x),abs(K-x))
answer *= 2

print(ans)

### FIXED CODE ###

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

answer = 0

for x in X:
  answer += min(abs(x),abs(K-x))
answer *= 2

print(answer)