Harryxun/stf_run huggingface dataset:
a = raw_input()
b = raw_input()

a = "".join( sorted( list(a) ) )
b = "".join( sorted( list(b) ) )

yes = True
printed = False

if len(a) < len(b):
    i = 0
    while i < len(a):
        if a[i] != b[i]:
            yes = False
            break
        i += 1
    if yes:
        print "Yes"
        printed = True

if not printed:
    i = 0
    b = "".join( sorted( list(b), reverse = True ) )

    while i < len(a):
        if a[i] < b[i]:
            print "Yes"
            printed = True
            break
        elif a[i] > b[i]:
            print "No"
            printed = True
            break
        i += 1
    if not printed:
        print "No"

if not printed:
    print "Yes"
    printed = True


### FIXED CODE ###

a = raw_input()
b = raw_input()

a = "".join( sorted( list(a) ) )
b = "".join( sorted( list(b) ) )

yes = True
printed = False

if len(a) < len(b):
    i = 0
    while i < len(a):
        if a[i] != b[i]:
            yes = False
            break
        i += 1
    if yes:
        print "Yes"
        printed = True

if not printed and len(b) > 0:
    i = 0
    b = "".join( sorted( list(b), reverse = True ) )

    while i < len(a) and i < len(b):
        if a[i] < b[i]:
            print "Yes"
            printed = True
            break
        elif a[i] > b[i]:
            print "No"
            printed = True
            break
        i += 1
if not printed:
    print "No"
k = 0
i = 1

while k == 1:
   x = input()
   if x == 0:
      k = 1
   else:
      print Case i: x
      i =+ 1

### FIXED CODE ###

i = 0
     
while 1:
   i += 1
   x = input()
   if x == 0:
      break
   else:
      print "Case %d: %d" %(i, x)
from collections import deque
s=input()
money=int(input())
ans=deque()

d = dict(zip([chr(i) for i in range(97, 97+26)], range(0,26)))
d_r = dict(zip(range(0,26),[chr(i) for i in range(97, 97+26)]))

s_hash = deque([d[i] for i in s])

while len(s_hash)>0:
    #print(money,s_hash,ans)
    n = s_hash.popleft()
    if money >= 26 - n:
        ans.append(0)
        money -= 26 - n
    else:
        ans.append(n)
#print(money,s_hash,ans)
if money>0:
    n = ans.pop()
    ans.append(n+money)
    money = 0
    
print("".join([d_r[i] for i in ans]))

### FIXED CODE ###

from collections import deque
s=input()
money=int(input())
ans=deque()

d = dict(zip([chr(i) for i in range(97, 97+26)], range(0,26)))
d_r = dict(zip(range(0,26),[chr(i) for i in range(97, 97+26)]))

s_hash = deque([d[i] for i in s])

while len(s_hash)>0:
    #print(money,s_hash,ans)
    n = s_hash.popleft()
    if (money >= 26 - n) & (n != 0):
        ans.append(0)
        money -= 26 - n
    else:
        ans.append(n)
#print(money,s_hash,ans)
money = money % 26
while money>0:
    n = ans.pop()
    ans.append((n+money) % 26)
    money = 0

print("".join([d_r[i] for i in ans]))
S = list(map(int,input().split()))
 
if S[0] =< S[1] =< S[2] =< S[3]:
    print (0)
    
elif S[0] =< S[2] =< S[3] =< S[1]:
    print(S[3]-S[2])
    
elif S[0] =< S[2] =< S[1] =< S[3]:
    print(S[1] - S[2])
    
elif S[2] =< S[0] =< S[3] =< S[1]:
    print(S[3] - S[0])
 
elif S[2] =< S[3] =< S[0] =< S[1]:
    print(0)

### FIXED CODE ###

A,B,C,D=map(int,input().split())
 
if B<=C or D<=A:
    print(0)
elif A<=C and B<=D:
    print(B-C)
elif C<=A and D<=B:
    print(D-A)
elif A<=C and D<=B:
    print(D-C)
elif C<=A and B<=D:
    print(B-A)
N = map(int, input())
if N % 2 == 0:
  print(N / 2 /N)
else:
  print((N // 2 + 1) / N)

### FIXED CODE ###

N = int(input())
if N % 2 == 1:
    print((N // 2 + 1) / N)
else:
    print((N // 2) / N)
N, K = map(int, input().split())
A = list(map(int, input().split()))

n = 1
ls = [1]
lps = 0
lpn = 0
for i in range(K):
    n = A[n-1]
    ls += [n]
    if A[n-1] in ls:
        lps = ls.index(A[n-1])
        lpn = i+2-lps
        break

print(ls[lps:][(K-lps)%lpn])

### FIXED CODE ###

N, K = map(int, input().split())
A = list(map(lambda s: int(s)-1, input().split()))

n = 0
visit = {0}
ls = [0]
for _ in range(K):
    n = A[n]
    if n not in visit:
        visit.add(n)
        ls += [n]
    else:
        loop_start = 0
        loop_length = 0
        flag = False
        m = 0
        for _ in range(N):
            if n == m:
                if flag:
                    break
                else:
                    flag = True
            if flag:
                loop_length += 1
            else:
                loop_start += 1
            m = A[m]

        print(ls[loop_start + ((K-loop_start) % loop_length)]+1)
        break
else:
    print(n+1)
N,K = map(int,input().split())
A = [int(i) for i in input().split()]
S = sum(A)

def searchPrimeNum(N):
    max = int(N**0.5)
    seachList = [i for i in range(2,N+1)]
    primeNum = []
    while seachList[0] <= max:
        primeNum.append(seachList[0])
        tmp = seachList[0]
        seachList = [i for i in seachList if i % tmp != 0]
    primeNum.extend(seachList)
    return primeNum

plis = searchPrimeNum(40000)

lis = []
for p in plis:
    if S%p == 0:
        lis.append([p,1])
        S = S//p
        while S%p == 0:
            lis[-1][1] += 1
            S = S//p
    if S == 1:
        break
if S != 1:
    lis.append([[S,1]])

yakulis =[1]
for l in lis:
    for j in range(len(yakulis)):
        for k in range(l[1]):
            n = yakulis[j]
            yakulis.append(l[0]**(k+1)*n)
yakulis.sort(reverse=True)

s = True
for r in yakulis:
    B = [i%r for i in A]
    B.sort()
    le = -1
    ri = N
    while ri-le > 1:
        mid = (le+ri)//2
        pl = sum(B[:mid+1])
        mi = r*(N-1-mid) - sum(B[mid+1:])
        if pl > mi:
            ri = mid
        else:
            le = mid
    k = sum(B[:le+1])
    if k <= K:
        s = False
        print(r)
        break
if s:
    print(1)

### FIXED CODE ###

N,K = map(int,input().split())
A = [int(i) for i in input().split()]
S = sum(A)

def searchPrimeNum(N):
    max = int(N**0.5)
    seachList = [i for i in range(2,N+1)]
    primeNum = []
    while seachList[0] <= max:
        primeNum.append(seachList[0])
        tmp = seachList[0]
        seachList = [i for i in seachList if i % tmp != 0]
    primeNum.extend(seachList)
    return primeNum

plis = searchPrimeNum(40000)

lis = []
for p in plis:
    if S%p == 0:
        lis.append([p,1])
        S = S//p
        while S%p == 0:
            lis[-1][1] += 1
            S = S//p
    if S == 1:
        break
if S != 1:
    lis.append([S,1])

yakulis =[1]
for l in lis:
    for j in range(len(yakulis)):
        for k in range(l[1]):
            n = yakulis[j]
            yakulis.append(l[0]**(k+1)*n)
yakulis.sort(reverse=True)

s = True
for r in yakulis:
    B = [i%r for i in A]
    B.sort()
    le = -1
    ri = N
    while ri-le > 1:
        mid = (le+ri)//2
        pl = sum(B[:mid+1])
        mi = r*(N-1-mid) - sum(B[mid+1:])
        if pl > mi:
            ri = mid
        else:
            le = mid
    k = sum(B[:le+1])
    if k <= K:
        s = False
        print(r)
        break
if s:
    print(1)
a, b, k = map(int, input().split())
li =[]

for i in range(1, a):
    if a % i == 0:
        li.append(i)
    else:
        continue

for i in range(1, b):
    if b % i == 0:
        li.append(i)
    else:
        continue

li2 =[]
for n in range(len(li)):
    if not li[n] in li2: 
        if li.count(li[n]) == 2:
            li2.append(li[n])

li2.sort(reverse=True)
print(li2[k-1])

### FIXED CODE ###

a, b, k = map(int, input().split())

def ooo(x):
    lix =[]
    for i in range(1, x+1):
        if x % i == 0:
            lix.append(i)
    return lix

lia = ooo(a)
lib = ooo(b)
li = lia + lib

li2 =[]
for n in range(len(li)):
    if not li[n] in li2: 
        if li.count(li[n]) == 2:
            li2.append(li[n])

li2.sort(reverse=True)
print(li2[k-1])
#!/usr/bin/env python3
import sys
import collections

sys.setrecursionlimit(10 ** 8)
ni = lambda: int(sys.stdin.readline())
nm = lambda: map(int, sys.stdin.readline().split())
nl = lambda: list(nm())
ns = lambda: sys.stdin.readline().rstrip()

N, M = nm()
adj = [[] for _ in range(N)]
for i in range(M):
    a, b = nm()
    a -= 1
    b -= 1
    adj[a].append(b)
    adj[b].append(a)


def solve():
    INF = 1 << 62
    q = collections.deque([(0, 0, -1)])
    dist = [INF] * N
    prev = [None] * N
    while q:
        l, node, pnode = q.popleft()
        if dist[node] < l:
            continue
        dist[node] = l
        prev[node] = pnode
        for nxt in adj[node]:
            if nxt != pnode and dist[nxt] > l + 1:
                q.append((l + 1, nxt, node))
    if any(x is None for x in prev):
        print("No")
        return
    print("Yes")
    for i in range(1, N):
        print(prev[i] + 1)


if __name__ == "__main__":
    solve()


### FIXED CODE ###

N = int(input())%10
if N ==3:
  print('bon')
elif N in [0,1,6,8]:
  print('pon')
else:
  print('hon')
N=number=int(input())
X_list=list(map(int, input().split()))

X_min=min(X_list)
X_max=max(X_list)
for i in range(X_min,X_max):
    sum_pow=0
    for j in range(N):
        sum_pow+=(X_list[j]-i)**2
    if i==X_min:
        min_pow=sum_pow
    if min_pow>sum_pow:
        min_pow=sum_pow
print(min_pow)

### FIXED CODE ###

N=number=int(input())
X_list=list(map(int, input().split()))
min_pow=0
if N==1:
    print("0")
else:
    X_min=min(X_list)
    X_max=max(X_list)
    for i in range(X_min,X_max):
        sum_pow=0
        for j in range(N):
            sum_pow+=(X_list[j]-i)**2
        if i==X_min:
            min_pow=sum_pow
        if min_pow>sum_pow:
            min_pow=sum_pow
    print(min_pow)
s = input()
alpha = abcdefghijklmnopqrstuvwxyz

for i in list(alpha):
  if i not in s:
    print(i)
    exit()
    
print('None')

### FIXED CODE ###

s = input()
alpha = 'abcdefghijklmnopqrstuvwxyz'
 
for i in list(alpha):
  if i not in s:
    print(i)
    exit()
    
print('None')
N = int(input())
list_S = []
for i in range(N):
  if not str(input()) in list_S: list_S.append(str(input()))
print(len(list_S))

### FIXED CODE ###

N = int(input())
list_S = [str(input()) for i in range(N)]
print(len(list(set(list_S))))
def search(x,r):
  low = 0
  high = len(r)-1
  mid = (low+high)//2
  while low<=high:
    rr = r[mid]-x
    ll = r[mid+1]-x
    if rr*ll<=0:
      return(abs(rr),abs(ll))
    elif r[mid]-x > 0:
      high = mid
      mid = (low+high)//2
    else:
      low = mid
      mid = (low+high)//2
      

a, b, q = [int(i) for i in input().split()]
s = []
for i in range(a):
	s.append(int(input()))
t = []
for i in range(b):
	t.append(int(input()))
x = []
for i in range(q):
	x.append(int(input()))

for xx in x:

  s_l = float('inf')
  s_r = float('inf')
  if s[-1] - xx <= 0:
    s_l = abs(s[-1] - xx)
  elif s[0] - xx >= 0:
    s_r = abs(s[0] - xx)
  else:
  	s_l,s_r=search(xx,s)
  
  t_l = float('inf')
  t_r = float('inf')
  if t[-1] - xx <= 0:
    t_l = abs(t[-1] - xx)
  elif t[0] - xx >= 0:
    t_r = abs(t[0] - xx)
  else:
  	t_l,t_r=search(xx,t)
  
  #print(s_l,s_r,t_l,t_r)
  
  #l = max(s_l,t_l)
  #r = max(s_r,t_r)
  if s_l <= t_l:
    l = t_l
    lr = s_l*2 + t_r
  else:
    r = s_l
    lr = t_l*2 + s_r
  if s_r <= t_r:
    r = t_r
    rl = s_r*2 + t_l
  else:
    r = s_r
    lr = t_r*2 + s_l
 
  ans = min(l,r,lr,rl)
  print(ans)
  

### FIXED CODE ###

from bisect import bisect

a, b, q = [int(i) for i in input().split()]
s = []
for i in range(a):
	s.append(int(input()))
s = [-float('inf')] + s + [float('inf')]
t = []
for i in range(b):
	t.append(int(input()))
t = [-float('inf')] + t + [float('inf')]
x = []
for i in range(q):
	x.append(int(input()))

for xx in x:
  
  s_i = bisect(s,xx)
  s_r = abs(xx - s[s_i])
  s_l = abs(xx - s[s_i-1])
  t_i = bisect(t,xx)
  t_r = abs(xx - t[t_i])
  t_l = abs(xx - t[t_i-1])

  
  #print(s_l,s_r,t_l,t_r)
  
  #l = max(s_l,t_l)
  #r = max(s_r,t_r)
  if s_l <= t_l:
    l = t_l
    lr = s_l*2 + t_r
  else:
    l = s_l
    lr = t_l*2 + s_r
  if s_r <= t_r:
    r = t_r
    rl = s_r*2 + t_l
  else:
    r = s_r
    rl = t_r*2 + s_l
 
  ans = min(l,r,lr,rl)
  print(ans)
N, A, B, C, D = map(int, input().split())
S = input()

A -= 1
B -= 1
C -= 1
D -= 1

def check2():
	for i in range(A, C - 1):
		if S[i] == S[i + 1] == "#":
			return False
	
	if D < C:
		for i in range(B, D):
			if S[i - 1] == S[i] == S[i + 1] == ".":
				return True
		return False
	else:
		return True

if check():
	print("Yes")
else:
	print("No")


### FIXED CODE ###

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

A -= 1
B -= 1
C -= 1
D -= 1

def check():
	for i in range(A + 1, C - 1):
		if S[i] == S[i + 1] == "#":
			return False

	for i in range(B + 1, D - 1):
		if S[i] == S[i + 1] == "#":
			return False
	
	if D < C:
		for i in range(B, D + 1):
			if S[i - 1] == S[i] == S[i + 1] == ".":
				return True
		return False
	else:
		return True

if check():
	print("Yes")
else:
	print("No")
N=int(input())
a=[int(i) for i in input().split()]
 
count=0
ans=0
for i in range(N):
    if a[i]<0:
        c+=1        
    a[i]=abs(a[i])

if c%2==0
    ans=sum(a)
else:
    a.sort()
    ans=sum(a)-a[0]

### FIXED CODE ###

N = int(input())

a = [int(i) for i in input().split()]

count=0
ans=0

for i in range(N):
    if a[i]<0:
        count+=1
    a[i]=abs(a[i])

if count%2==0:
    ans=sum(a)

else:
    a.sort()
    ans=sum(a)-a[0]*2

print(ans)
def makelist(n, m):
    return [[0 for i in range(m)] for j in range(n)]

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

def checker(n): # int => int list
    s = format(n, 'b')
    l = len(s)
    res = [0]*l
    for i in range(l):
        if i == l - 1:
            hoge = n // 4
            if n == hoge + 1 or n == hoge + 2:
                res[i] = 1
        else:
            if s[i] == "1":
                res[i] = (int(s[i+1:], 2) + 1) % 2
    return res

a = checker(A-1) if A > 0 else "0"
b = checker(B)

if len(a) < len(b):
    tmp = a
    a = b
    b = tmp

b = [0 for _ in range(len(a) - len(b))] + b

ans = ""
for i in range(len(a)):
    ans += str(a[i] ^ b[i])
ans = int(ans, 2)
print(ans)


### FIXED CODE ###

def makelist(n, m):
    return [[0 for i in range(m)] for j in range(n)]

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

def checker(n): # int => int list
    s = format(n, 'b')
    l = len(s)
    res = [0]*l
    for i in range(l):
        if i == l - 1:
            hoge = n // 4
            if n == hoge * 4 + 1 or n == hoge * 4 + 2:
                res[i] = 1
        else:
            if s[i] == "1":
                res[i] = (int(s[i+1:], 2) + 1) % 2
    return res

a = checker(A-1) if A > 0 else [0]
b = checker(B)

if len(a) < len(b):
    tmp = a
    a = b
    b = tmp

b = [0 for _ in range(len(a) - len(b))] + b

ans = ""
for i in range(len(a)):
    ans += str(a[i] ^ b[i])
ans = int(ans, 2)
print(ans)
import numpy as np
N=int(input())
H=np.array(list(map(int,input().split())))
diffH = np.diff(H)
if np.any(diffH <= -2):
  print("No")
  exit(0)

if np.any((diffH[range(N-2)] + diffH[range(1, N-1)]) <= -2):
  print("No")
  exit(0)
 
print("Yes")


### FIXED CODE ###

import numpy as np
N = int(input())
H = list(map(int, input().split()))

max = 0
for i in range(N):
  if max < H[i]:
    max = H[i]
  if max - H[i] >= 2:
    print("No")
    exit(0)
print("Yes")
N = int(input())
A = list(map(int, input().split()))
last = A[-1]
count = last
root = 1
for i in range(N):
  if root <= A[i]:
    print(-1)
    break
  if i+1 == N and root-A[i] > A[i+1]:
    root = last + A[i]
  elif root-A[i] > (last + A[i+1]):
    root = (last + A[i+1]) + A[i]
  count+=root
  root = (root-A[i])*2
else:
  if count == 0 or root < last:
    count = -1
  print(count)

### FIXED CODE ###

h1, m1, h2, m2, k = map(int, input().split())

h1*=60
h1+=m1
h2*=60
h2+=m2
if h1 > h2:
  h2+=60*24

begin = h2 - k

print(begin-h1)
n,m = map(int, input().split())
a = []
for i in range(m):
  x,y = map(int, input().split())
  a.append((x,y))
a.sort()
ans = 1
l,r = a[0][]
for x,y in a[1:]:
  if r <= x:
    ans += 1
    r = x
    l = y
  else:
    r = max(r, y)
print(ans)

### FIXED CODE ###

n,m = map(int, input().split())
a = []
for i in range(m):
  x,y = map(int, input().split())
  a.append((x,y))
a.sort(key=lambda x:x[1])
ans = 1
l,r = a[0]
for x,y in a[1:]:
  if r <= x:
    ans += 1
    l = x
    r = y

print(ans)
import numpy as np
import sys
input = sys.stdin.readline


def main():
    n = int(input())
    A = np.array([int(i) for i in input().split()])

    A.sort()
    max_dp = A[-1]
    A = np.append(A, 10 ** 6 + 2)

    dp = np.ones(max_dp + 1, dtype=bool)

    if A[0] != A[1]:
        ans = 1

    ans = 0
    for i in range(n):
        if A[i] == A[i + 1] or not dp[A[i]]:
            continue
        # print(f"{i = }, {max_dp = }\n{dp = }")
        a = A[i]
        fancy = np.arange(a, max_dp + 2, a)
        dp[fancy] &= False

        ans += 1

    print(ans)


if __name__ == '__main__':
    main()

### FIXED CODE ###

import numpy as np
import sys
input = sys.stdin.readline


def main():
    n = int(input())
    A = np.array([int(i) for i in input().split()])

    max_dp = np.max(A) + 1
    dp = np.zeros(max_dp, dtype="int32")

    for a in A:
        if dp[a] >= 2:
            continue
        fancy = np.arange(a, max_dp, a)
        dp[fancy] += 2
        dp[a] -= 1
    print(np.sum(dp == 1))


if __name__ == '__main__':
    main()
import numpy as np

N, M = map(int, input().split())

members = np.array([-1] * N).astype(np.int)

group_count = 0
groups = [0] * N
group_dict = {}
for m in range(M):
    A, B = map(int, input().split())
    A = A - 1
    B = B - 1
    if members[A]==-1 and members[B]==-1:
        members[A] = members[B] = group_count
        groups[group_count] = 2
        group_dict[group_count] = [A, B]
        group_count += 1
    
    elif members[A]!=-1 and members[B]==-1:
        members[B] = members[A]
        groups[members[A]] += 1
        group_dict[members[A]].append(B)
    
    elif members[B]!=-1 and members[A]==-1:
        members[A] = members[B]
        groups[members[B]] += 1
        group_dict[members[B]].append(A)
    
    else:
        if members[A] != members[B]:
            old = members[B]
            groups[members[A]] += groups[members[B]]
            groups[members[B]] = 0
            group_dict[members[A]] = group_dict[members[A]] +  group_dict[members[B]]
            for aaaaaa in group_dict[members[B]]:
                members[aaaaaa] = members[A]
            group_dict[old] = []

ans = max(groups)
if ans == 0:
    print(1)
else:
    print(ans)

### FIXED CODE ###

class UnionFind:
    def __init__(self, N):
        self.parent = list(range(N))
        self.rank = [0] * N
        self.size = [1] * N

    def find(self, x):
        r = x
        while self.parent[r] != r:
            r = self.parent[r]
        while self.parent[x] != r:
            x, self.parent[x] = self.parent[x], r
        return r

    def unite(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x == y:
            return
        if self.rank[x] < self.rank[y]:
            self.parent[x] = y
            self.size[y] += self.size[x]
        else:
            self.parent[y] = x
            self.size[x] += self.size[y]
            if self.rank[x] == self.rank[y]:
                self.rank[x] += 1

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def get_size(self, x):
        return self.size[self.find(x)]

N, M = map(int, input().split())
uf = UnionFind(N)
for _ in range(M):
    A, B = map(int, input().split())
    uf.unite(A-1, B-1)

ans = max(uf.get_size(i) for i in range(N))
print(ans)
import sys
sys.setrecursionlimit(3000)
n = int(input())
x = list(map(int, input().split()))

dx = [0]*(n-1)
for i in range(n-1):
    dx[i] = x[i+1] - x[i]

def fact(n):
    if n <= 1:
        return n
    else:
        return n*fact(n-1)
    
r = fact(n-1)//2
res = 0
for j in range(n-1):
    if j == 0:
        res += dx[j]*fact(n-1)
    else:
        res += dx[j]*fact(n-1) + r
        r = r + r//(j+1)
        
ans = res%(10**9+7)
print(ans)

### FIXED CODE ###

n = int(input())
s = []
t = []
for i in range(n):
    ss, tt = map(str, input().split())
    s.append(ss)
    t.append(int(tt))
x =input()

song= s.index(x)
res = 0
for i in range(song+1, n):
    res += t[i]
    
print(res)
# coding: utf-8
 
n, m, x, y = map(int, input().split())
xn = list(map(int, input().split()))
ym = list(map(int, input().split()))
 
if x < y:
    for i in range(x, y+1):
        if max(xn) < i and min(ym)>=i:
            print("War")
        elif i == y:
            print("No War")
else:
    print("No War")

### FIXED CODE ###

# coding: utf-8
 
a, b, c = map(int, input().split())
 
x = a*10 + b
y = b*10 + c
z = c*10 + a
 
if x >= y and x >= z:
    print(x + c)
elif y >= x and y >= z:
    print(y + a)
else:
    print(z + b)
A = int(input())
B = Int(input())

if A == B:
  print("EQUAL")
elif A > B:
  print("GREATER")
else:
  print("LESS")

### FIXED CODE ###

A = int(input())
B = int(input())

if A == B:
  print("EQUAL")
elif A > B:
  print("GREATER")
else:
  print("LESS")
a, b, c, d = map(int, input().split())
attack = True
win = True

while a < 0 | c < 0:
	if attack:
		c -= b
		attack = False
	else:
		a -= d
		attack = True
		if a < 0:
			win = False
            
print("Yes") if win else print('No')


### FIXED CODE ###

s, w = map(int, input().split())

print("unsafe") if (s <= w) else print("safe")
a,b,c = map(int, raw_input().split(" "))
if a <= b :
    if a <= b <= c :
        print("{1} {2} {3}".format(1=a,2=b,3=c))
    elif a <= c <= b :
        print("{1} {2} {3}".format(1=a,2=c,3=b))
    else :
        print("{1} {2} {3}".format(1=c,2=a,3=b))
else b <= a :
    if b <= a <= c :
        print("{1} {2} {3}".format(1=b,2=a,3=c))
    elif b <= c <= a :
        print("{1} {2} {3}".format(1=b,2=c,3=a))
    else :
        print("{1} {2} {3}".format(1=c,2=b,3=a))

### FIXED CODE ###

al = list(map(int, input().split()))
al = sorted(al)
print(al[0],al[1],al[2])
n, k = map(int, input().split())
l = list(map(int, input().split()))
 
tmp = l[:k]
now = tmp
 
for i in range(n-k+1):
  tmp -= l[i]
  tmp += l[i+k]
  now = max(tmp, now)
  
print((now + k) / 2)

### FIXED CODE ###

n, k = map(int, input().split())
l = list(map(int, input().split()))
 
tmp = sum(l[:k])
now = tmp
 
for i in range(n-k):
  tmp -= l[i]
  tmp += l[i+k]
  now = max(tmp, now)
  
print((now + k) / 2)
n,k=map(int,input().split())
dp=[[0 for i in range(k+1)] for j in range(n+1)]
if k==0 or n==k:
  dp[n][k]==1
if k==1 or k==n-1:
  dp[n][k]==n
a=n-r
if r>=a:
  r=a
for i in range(n+1):
  dp[i][0]=1
dp[1][1]=1
for i in range(2,n+1):
  for j in range(1,k+1):
    dp[i][j]=dp[i-1][j-1]+dp[i-1][j]
for i in range(1,k+1):
  ans=dp[n-k+1][i]*dp[k-1][i-1]
  while ans>10**9+7:
    ans%=10**9+7
  print(ans)

### FIXED CODE ###

n,k=map(int,input().split())
dp=[[0 for i in range(k+1)] for j in range(n+1)]
for i in range(n+1):
  dp[i][0]=1
dp[1][1]=1
for i in range(2,n+1):
  for j in range(1,k+1):
    dp[i][j]=dp[i-1][j-1]+dp[i-1][j]
for i in range(1,k+1):
  ans=dp[n-k+1][i]*dp[k-1][i-1]
  while ans>10**9+7:
    ans%=10**9+7
  print(ans)
s = input()
t = input()

if int(s[0]) > 1:
    print(int(s[0]))
else:
    print(int(s[1]))

### FIXED CODE ###

s = list(input())
k = int(input())-1
s = s[:k+1]
nums = ["2","3","4","5","6","7","8","9"]

ans_idx = k
for n in nums:
    if n not in s:
        continue
    cur_idx = s.index(n)
    ans_idx = min(ans_idx,cur_idx)

print(s[ans_idx])
import numpy as np 
N = int(input())
A =list(map(int, input().strip().split()))
Ap = np.abs(A)
i = 0
m = 0
s = 1
while i <= N - 1:
    if A[i] < 0:
        m += 1
    i += 1
if m % 2 == 0:
    M = np.sum(Ap)
if m % 2 == 1:
    M = np.sum(Ap) - 2 * Ap[0]
    while s <= N - 1:
        M1 = np.sum(Ap) - 2 * Ap[s]
        if M1 > M:
            M = M1
        s += 1
print(M)

### FIXED CODE ###

A, B, T = list(map(int, input().strip().split()))
i = 1
X = 0
while A * i < T + 0.5:
  X = X + B
  i += 1
else:
  print(X)