Harryxun/stf_run huggingface dataset:
S = input()
S.reverse()
cands = map(reverse,["dream","dreamer","erase","eraser"])
i = 0
while i < len(S):
  for word in cands:
	S[i:].startsWith(word)
    i += len(word)
if i == len(S):
  return True
return False

### FIXED CODE ###

S0 = input()
S = S0[::-1]
cands = ["dream"[::-1],"dreamer"[::-1],"erase"[::-1],"eraser"[::-1]]
i = 0
while i < len(S):
  f = False
  for word in cands:
    #print(S[i:],word)
    if S[i:].startswith(word):
        f = True
        i += len(word)
        break
  if f == False:
    print("NO")
    exit(0)
#print(i)
if i == len(S):
  print("YES")
else:
  print("NO")
H,W=map(int, input().split())
A=[input() for _ in range(H)]

import queue
q=queue.Queue()
B=[[None]*H for _ in range (W)]
cnt=0
for i in range(H):
    for j in range(W):
        if A[i][j]=="#":
            q.put((i,j))
            B[i][j]=0
dx=[-1,1,0,0]
dy=[0,0,-1,1]
while q.empty()==False:
  XY=[]
  while q.empty()==False:
     XY.append(q.get())
  for xy in XY:
    for i in range(4):
      if 0<=xy[0]+dx[i]<=H-1 and 0<=xy[1]+dy[i]<=W-1:
        if B[xy[0]+dx[i]][xy[1]+dy[i]]==None:
          B[xy[0]+dx[i]][xy[1]+dy[i]]=B[xy[0]][xy[1]]+1
          q.put((xy[0]+dx[i],xy[1]+dy[i]))
print(max([max(B[i]) for i in range(H)]))

### FIXED CODE ###

H,W=map(int, input().split())
A=[input() for i in range(H)]

from collections import deque

q=deque([])
B=[[None]*W for _ in range (H)]
for i in range(H):
    for j in range(W):
        if A[i][j]=="#":
            q.append((i,j))
            B[i][j]=0
dx=[-1,1,0,0]
dy=[0,0,-1,1]
while len(q)>0:
  XY=[]
  while len(q)>0:
     XY.append(q.popleft())
  for xy in XY:
    for i in range(4):
      if 0<=(xy[0]+dx[i])<=H-1 and 0<=(xy[1]+dy[i])<=W-1:
        if B[xy[0]+dx[i]][xy[1]+dy[i]]==None:
          B[xy[0]+dx[i]][xy[1]+dy[i]]=B[xy[0]][xy[1]]+1
          q.append((xy[0]+dx[i],xy[1]+dy[i]))
        else: pass
      else: pass
print(max([max(B[i]) for i in range(H)]))
s1, s2, s3 = input().split()
ans = (s1[0]+s2[0]+s3[3]).upper()
print(ans)

### FIXED CODE ###

s1, s2, s3 = input().split()
ans = (s1[0]+s2[0]+s3[0]).upper()
print(ans)
N, M = map(int, input().split())

K = [list(map(int, input().split())) for row in range(N)]
if N = 1:
	print(K[0][0])
else:
	for i in range(N):
		K[i].pop(K[i][0])

	foods = set(K[0])
	i = 0
	while i < N:
		foods = foods.intersection(set(K[i]))
		if foods == set():
			break
		
		else:
			i += 1
	print(len(list(foods)))





### FIXED CODE ###

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

K = [list(map(int, input().split())) for row in range(N)]
if N == 1:
	print(K[0][0])
else:
	for i in range(N):
		K[i].remove(K[i][0])

	foods = set(K[0])
	i = 0
	while i < N:
		foods = foods.intersection(set(K[i]))
		if foods == {}:
			
			break
			exit()
		i += 1
	print(len(list(foods)))
N, K = list(map(int, input().split()))
A  = list(map(int, input().split()))
MOD = 10**9+7N, K = list(map(int, input().split()))
A  = list(map(int, input().split()))
MOD = 10**9+7

#　そのブロック内での転倒数
ans1 = 0
for i in range(N):
    for j in range(i+1,N):
        if A[i] > A[j]:
            ans1 += 1

#　２つのブロック内での転倒数
ans2 = 0
B = sorted(A)
now = B[0]
cnt = 0
for i in range(1,N):
    if now != B[i]:
        cnt = i
        ans2 += cnt
        now = B[i]
    else:
        ans2 += cnt

ans11 = ans1 * K
ans22 = ans2 * (K * (K-1) // 2)
ans = ans11 + ans22
print(int(ans % MOD))


#　そのブロック内での転倒数
ans1 = 0
for i in range(N):
    for j in range(i+1,N):
        if A[i] > A[j]:
            ans1 += 1

#　２つのブロック内での転倒数
ans2 = 0
B = sorted(A)
now = B[0]
cnt = 0
for i in range(1,N):
    if now != B[i]:
        cnt = i
        ans2 += cnt
        now = B[i]
    else:
        ans2 += cnt

ans11 = ans1 * (K + 1)
ans22 = ans2 * (K * (K-1) / 2)
ans = ans11 + ans22
print(int(ans % MOD))


### FIXED CODE ###

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

#　そのブロック内での転倒数
ans1 = 0
for i in range(N):
    for j in range(i+1,N):
        if A[i] > A[j]:
            ans1 += 1

#　２つのブロック内での転倒数
ans2 = 0
B = sorted(A)
now = B[0]
cnt = 0
for i in range(1,N):
    if now != B[i]:
        cnt = i
        ans2 += cnt
        now = B[i]
    else:
        ans2 += cnt

ans11 = ans1 * K
ans22 = ans2 * (K * (K-1) // 2)
ans = ans11 + ans22
print(ans % MOD)
def resolve():
	n, m = map(int, input().split())
	w = list()
	ans = ""
	for _ in range(m):
		w.append("".join(sorted(input())))
	w.sort()
	for word in w:
		ans += word
	print(ans)

resolve()

### FIXED CODE ###

def resolve():
	n, m = map(int, input().split())
	w = list()
	ans = ""
	for _ in range(n):
		w.append(input())
	w.sort()
	for word in w:
		ans += word
	print(ans)

resolve()
import heapq

print(1)

N = int(input())
XY = [list(map(int, input().split())) for _ in range(N)]
X = []
Y = []
for x, y in XY:
  X.append((x, i + 1))
  Y.append((y, i + 1))
    
X.sort()
Y.sort()
 
graph = [[] for _ in range(N + 1)]
 
for i in range(N - 1):
  x1, a = X[i]
  x2, b = X[i + 1]
  graph[a].append((abs(x1 - x2), b))
  graph[b].append((abs(x1 - x2), a))
  y1, a = Y[i]
  y2, b = Y[i + 1]
  graph[a].append((abs(y1 - y2), b))
  graph[b].append((abs(y1 - y2), a))
    
check = [0] * (N + 1)
stack = []
heapq.heapify(stack)
for w, g in graph[1]:
  heapq.heappush(stack, (w, g))

check[1] = 1
answer = 0
cnt = 0

while cnt < N - 1:
  v, s = heapq.heappop(stack)
  if check[s] == 0:
    check[s] = 1
    answer += v
    cnt += v
    for w, g in graph[s]:
      if check[g] == 0:
        heapq.heappush(stack, (w, g))

print(answer)

### FIXED CODE ###

import sys
input = sys.stdin.buffer.readline

N = int(input())
XY = [list(map(int, input().split())) + [i + 1] for i in range(N)]

dist = []

XY.sort()
for i in range(N - 1):
  dist.append((abs(XY[i][0] - XY[i + 1][0]), (XY[i][2], XY[i + 1][2])))
XY.sort(key = lambda x: x[1])
for i in range(N - 1):
  dist.append((abs(XY[i][1] - XY[i + 1][1]), (XY[i][2], XY[i + 1][2])))
dist.sort()

root = [i for i in range(N + 1)]
comp_size = [1] * (N+1)
 
def root_find(x):
  y = root[x]
  if x == y:
    return x
  else:
    z = root_find(y)
    root[x] = z
    return z

def merge(x, y):
  rx = root_find(x)
  ry = root_find(y)
  sx = comp_size[rx]
  sy = comp_size[ry]
  if rx != ry:
    if sx >= sy:
      root[ry] = rx
      comp_size[rx] = sx + sy
    else:
      root[rx] = ry
      comp_size[ry] = sx + sy
      
answer = 0
for d, (a, b) in dist:
  if root_find(a) != root_find(b):
    merge(a, b)
    answer += d

print(answer)
while(1):
  count = input()
  if count == 0: break
  previous_cube = [1, 2, 3, 4, 5, 6]
  operation{'North':[2, 6, 3, 4, 1, 5], 'East':[4, 2, 1, 6, 5, 3], 'West': [3, 2, 6, 1, 5, 4], 'South':[5, 1, 3, 4, 6, 2], 'Right':[1, 3, 5, 2, 4, 6], 'Left[1, 4, 2, 5, 3, 6]}
  sum = 1
  for i in xrange(count):
    new_cube = []
    for i in xrange(6):
      new_cube.append(previous_cube[operation[raw_input()][i]])
    sum += new_cube[0]
    previous_cube = new_ccube
  print sum

### FIXED CODE ###

while 1:
  n = input()
  if n == 0:  break
  d = range(1, 7)
  ans = 1
  for i in range(n):
    c = raw_input()[0]
    if c == 'N': S = [1,5,2,3,0,4]
    elif c == "S": S = [4,0,2,3,5,1]
    elif c == "E": S = [3,1,0,5,4,2]
    elif c == "W": S = [2,1,5,0,4,3]
    elif c == "R": S = [0,2,4,1,3,5]
    elif c == "L": S = [0,3,1,4,2,5]
    d = [d[s] for s in S]
    ans += d[0]
  print ans
text = input()

text = text.strip(text[0])
text = text.strip(text[0])

if len(text) == 0:
  print("Yes")
else:
  print("No")


### FIXED CODE ###

text = input()

text1 = text.replace(text[0], "")
try:
	text2 = text1.replace(text1[0], "")
except:
	text2 = "e"

if len(text) == 4 and len(text1) == 2 and len(text2) == 0:
  print("Yes")
else:
  print("No")
from collections import Counter
from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall

import sys
input = sys.stdin.readline

def flatten_2dim(array):
    return [item for sublist in array for item in sublist]

n, x, y = map(int, input().split())
f_inf = float('inf')
dist = [[f_inf] * n for _ in range(n)]
for i in range(n): dist[i][i] = 0

for i in range(n-1):
    dist[i][i+1] = 1
    dist[i+1][i] = 1

dist[x-1][y-1]=1
dist[y-1][x-1]=1

G = csgraph_from_dense(dist, null_value=10**9)
dist = floyd_warshall(G)

counter = Counter(flatten_2dim(dist))
counter = sorted(counter.most_common())[1:]

for key, val in counter:
    print(val//2)
for i in range(n - len(counter)-1):
    print(0)

### FIXED CODE ###

from collections import deque
import sys
input = sys.stdin.readline

f_inf = float('inf')

def push(v, d):
    if dist[v] != f_inf: return
    dist[v] = d
    que.append(v)

n, x, y = map(int, input().split())
x -= 1
y -= 1

ans = [0]*n
for sv in range(n):
    dist = [f_inf] * n
    que = deque([])
    push(sv, 0)

    while que:
        v = que.popleft()
        d = dist[v]+1
        if v-1 >= 0: push(v-1, d)
        if v+1 < n: push(v+1, d)
        if v == x: push(y, d)
        if v == y: push(x, d)

    for i in range(n):
        ans[dist[i]] += 1
        
for i in range(n):
    ans[i] = ans[i]//2

for i in range(1, n):
    print(ans[i])
a,b,c,d = map(input().split())

if a='+' b='+' c='+' d='+':
	print('4')
elif a='+' b='+' c='+' d='-':
	print('2')
elif a='+' b='+' c='-' d='+':
	print('2')
elif a='+' b='+' c='-' d='-':
	print('0')
elif a='+' b='-' c='+' d='+':
	print('2')
elif a='+' b='-' c='+' d='-':
	print('0')
elif a='+' b='-' c='-' d='+':
	print('0')
elif a='+' b='-' c='-' d='-':
	print('-2')
elif a='-' b='+' c='+' d='+':
	print('2')
elif a='-' b='+' c='+' d='-':
	print('0')
elif a='-' b='+' c='-' d='+':
	print('0')	
elif a='-' b='+' c='-' d='-':
	print('-2')
elif a='-' b='-' c='-' d='+':
	print('-2')
elif a='-' b='-' c='+' d='-'
	print('-2')
elif a='-' b='-' c='-' d='+'
	print('-2')
else a='-' b='-' c='-' d='-'
	print('-4')




### FIXED CODE ###

S = input()

ans = 0
for i in range(len(S)):
    if S[i]=="+":
        ans += 1
    else:
        ans -= 1
        
print(ans)
import bisect
x, n = map(int, input().split())
pN = list(map(int, input().split()))
plus_flag = 1
minus_flag = 1
pN.sort()
key_index = bisect.bisect(pN, x) - 1
plus_index = key_index
minus_index = key_index
if n == 0:
    print(x)
else:
    while(1):
        if minus_flag == 1:
            if pN[key_index] - 1 != pN[key_index-1]:
                print(pN[key_index] - 1)
                break
            else:
                minus_index = minus_index + 1

        if minus_index == 0:
            minus_flag = 0



        if plus_flag == 1:
            if pN[key_index] + 1 != pN[key_index+1]:
                print(pN[key_index] + 1)
                break
            else:
                plus_index = plus_index + 1

        if plus_index == n:
            plus_flag = 0

### FIXED CODE ###

import bisect
x, n = map(int, input().split())
pN = list(map(int, input().split()))

pN.sort()

diff = 0

if n == 0:
    print(x)
else:
    while(1):
        if x-diff not in pN:
            print(x-diff)
            exit()
        elif x+diff not in pN:
            print(x+diff)
            exit()
        diff+=1
#!/usr/bin/env python
#-*- coding:utf-8 -*-
from collections import deque

def parse_cmd(deque,input_cmd):
	if input_cmd[0] == 'insert':
		deque.appendleft(input_cmd[1])
	elif input_cmd[0] == 'delete':
		deque.remove(input_cmd[1])
	elif input_cmd[0] == 'deleteFirst':
		deque.popleft()
	elif input_cmd[0] == 'deleteLast':
		deque.pop()
		
def main():
	que = deque()
	n = int(raw_input())
	cmd = [raw_input().split() for _ in range(n)]
	
	for i in cmd:
		parse_cmd(que,i)
	
	print " ".join(que)


#def test():

if __name__ == '__main__':
	main()
	#test()

### FIXED CODE ###

#!/usr/bin/env python
#-*- coding:utf-8 -*-
from collections import deque

def parse_cmd(deque,input_cmd):
	if input_cmd[0] == 'insert':
		deque.appendleft(input_cmd[1])
	elif input_cmd[0] == 'delete':
		try:
			deque.remove(input_cmd[1])
		except:
			pass
	elif input_cmd[0] == 'deleteFirst':
		deque.popleft()
	elif input_cmd[0] == 'deleteLast':
		deque.pop()
		
def main():
	que = deque()
	n = int(raw_input())
	cmd = [raw_input().split() for _ in range(n)]
	
	for i in cmd:
		parse_cmd(que,i)
	
	print " ".join(que)


#def test():

if __name__ == '__main__':
	main()
	#test()
a=int(input())
b=int(input())

area=a*b
print(area)

longht=2*a+2*b
print(longht)

print(str(area)+" "+str(longht))


### FIXED CODE ###

a, b = map(int, input().split())
print(str(a * b) + " " + str(2 * a + 2 * b))
import math
n, d = map(int, input().split())
x = 2*n + 1
print(int(math.ceil(n/x))

### FIXED CODE ###

import math
n, d = map(int, input().split())
x = 2*d + 1
print(int(math.ceil(n/x)))
N, K = map(int, input().split())
a = list(map(int, input().split()))

amin = min(a)

if len(myarr) == myarr.count(amin) :
    print("0")
else :
    if K == 1 : 
        print(N - myarr.count(amin))
    else :
        if (N - a.count(amin)) % (K - 1) == 0 :
            print((N - a.count(amin)) // (K - 1))
        else :
            print((N - a.count(amin)) // (K - 1) + 1)

### FIXED CODE ###

import math

N, K = map(int, input().split(" "))
a = map(int, input().split(" "))

# print(int((N - 1)/(K - 1)))

print(math.ceil((N - 1) / (K - 1)))
h,w,k=map(int,input().split())
x=[list(input()) for i in range(h)]
a=[[1]*w]+[[0]*w for i in range(h)]
n=0
for i in range(1,h+1):
  f=False
  if '#' in x[i-1]:
    n+=1
    for j in range(w):
      if x[i-1][j]=='#':
        if f:
          n+=1
        else:
          f=True
      a[i][j]=n
  else:
    for j in range(w):
      a[i][j]=a[i-1][j]
if '#' not in x[0]:
  c=[1]*w
  for j in range(h,0,-1):
    if a[j]==c:
      for k in range(j,0,-1):
        for i in range(w):
          a[k][i]=a[k+1][i]
      break
for i in range(1,h+1):
  print(*a[i]) 

### FIXED CODE ###

h,w,k=map(int,input().split())
x=[list(input()) for i in range(h)]
a=[['*']*w]+[[0]*w for i in range(h)]
n=0
for i in range(1,h+1):
  f=False
  if '#' in x[i-1]:
    n+=1
    for j in range(w):
      if x[i-1][j]=='#':
        if f:
          n+=1
        else:
          f=True
      a[i][j]=n
  else:
    for j in range(w):
      a[i][j]=a[i-1][j]
if '#' not in x[0]:
  c=['*']*w
  for j in range(1,h+1):
    if a[j]!=c:
      for k in range(j-1,0,-1):
        for i in range(w):
          a[k][i]=a[k+1][i]
      break
for i in range(1,h+1):
  print(*a[i])
n = int(raw_input())
s = raw_input()
aa = s.split(" ")
aaa = []
for i in range(n):
	aaa.append((i+1,int(aa[i])))

ctr = 0

for (a,b) in aaa:
	if (b,a) in aaa:
		aaa.remove((a,b))
		aaa.remove((b,a))
		ctr = ctr + 1

print(str(ctr))

### FIXED CODE ###

s = raw_input()
s2 = s[:4] + " " + s[4:]
print(s2)
S = list(map(int,input()split()))
L = list(map(int,input()split()))
n = 0
for i in range(3):
  if S[i] == L[i]:
    n += 1
print(n)

### FIXED CODE ###

S = input()
L = input()
n = 0
for i in range(3):
  if S[i] == L[i]:
    n += 1
print(n)
input()
lst=list(map(int,input().split())).sort()
print(lst[-1]-lst[0])

### FIXED CODE ###

input()
lst=list(map(int,input().split()))
lst.sort()
print(lst[-1]-lst[0])
s = int(input())
if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
    print('Bad')
else:
    print('Good')

### FIXED CODE ###

s = input()
if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
    print('Bad')
else:
    print('Good')
s=input()
i=0
for tmp in list(s):
  i+=1
  if i%2==0:
    if tmp in ['L','U','D']:
      continue
    else:
      x='N'
      break
  else:
    if tmp in ['R','U','D']:
      continue
    else:
      x='N'
      break
  break
if x=='N':
    print('No')
else:
    print('Yes')

### FIXED CODE ###

s=input()
i=0
for tmp in list(s):
  i+=1
  if i%2==0:
    if tmp in ['L','U','D']:
      x='Y'  
      continue
    else:
      x='N'
      break
  else:
    if tmp in ['R','U','D']:
      x='Y'  
      continue
    else:
      x='N'
      break
  break
if x=='N':
    print('No')
else:
    print('Yes')
a,b = input().split()
if a == b[0:-1]:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

a = input()
b = input()
if a == b[0:-1]:
    print('Yes')
else:
    print('No')
#! /usr/bin/env python3

from fractions import gcd
# from math import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations, combinations_with_replacement

N, K = [int(_) for _ in input().split()]
A = [int(_) for _ in input().split()]

flag = 0
done = [0] * (N + 1)

root = []
ind = 0

ind = A[0]
root = [1]
done[1] = 1

while True:

    if done[ind]:
        flag = 1
        break
    done[ind] = 1

    root += [ind]
    ind = A[ind-1]

if flag:
    if len(root) < K:
        left = root.index(ind) - 1
        loopcnt = len(root) - (root.index(ind))

        root2 = root[left+1:]
        print(root2[(K-(left+1)) % loopcnt])
    else:
        print(root[K])
else:
    print(root[K-1])


### FIXED CODE ###

#! /usr/bin/env python3

from fractions import gcd
# from math import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations, combinations_with_replacement

N, K = [int(_) for _ in input().split()]
A = [int(_) for _ in input().split()]

flag = 0
done = [0] * (N + 1)

root = []
ind = 0

ind = A[0]
root = [1]
done[1] = 1

while True:

    if done[ind]:
        flag = 1
        break
    done[ind] = 1

    root += [ind]
    ind = A[ind-1]

if flag:
    if len(root) <= K:
        left = root.index(ind) - 1
        loopcnt = len(root) - (root.index(ind))

        root2 = root[left+1:]
        print(root2[(K-(left+1)) % loopcnt])
    else:
        print(root[K])
else:
    print(root[K-1])
NQ = input().split(' ')
N = int(NQ[0])
Q = int(NQ[1])
tree_list = {0: []}
out_put_list = [0] * N

for i in range(N-1):
    tree_list[i+1] = []
    ab = input().split(' ')
    a = int(ab[0]) -1
    b = int(ab[1]) -1
    tree_list[a].append(b)

for _ in range(Q):
    px = input().split(' ')
    p = int(px[0])
    x = int(px[1])
    out_put_list[p-1] += x

for i in range(len(tree_list)):
    for num in tree_list[i]:
        out_put_list[num] += out_put_list[i]

print(*out_put_list)

### FIXED CODE ###


NQ = input().split(' ')
N = int(NQ[0])
Q = int(NQ[1])
out_put_list = [0] * N
tree_list = {}
for i in range(N):
    tree_list[i] = []

for i in range(N-1):
    ab = input().split(' ')
    a = int(ab[0]) -1
    b = int(ab[1]) -1
    tree_list[a].append(b)

for _ in range(Q):
    px = input().split(' ')
    p = int(px[0])
    x = int(px[1])
    out_put_list[p-1] += x

for i in range(len(tree_list)):
    for num in tree_list[i]:
        out_put_list[num] += out_put_list[i]

print(*out_put_list)
lst_blue = []
lst_red = []

N = int(input())
for i in range(0,N):
  lst_blue.append(input())
M = int(input())
for i in range(0,M):
  lst_red.append(input())

for i in list(set(lst_blue)):
  dic = {lst_bule[i]:int(lst_blue.count(i))}
for i in list(set(lst_red)):
  if i in dic:
    dic[i] -= 1

print(max(dic.values()))


### FIXED CODE ###

lst_blue = []
lst_red = []
dic = {}

N = int(input())
for i in range(0,N):
  lst_blue.append(input())
M = int(input())
for i in range(0,M):
  lst_red.append(input())

for i in list(set(lst_blue)):
  dic[i] = int(lst_blue.count(i))

for i in lst_red:
  if i in dic:
    dic[i] -= 1
    
print(max(0,max(dic.values())))
a, b, n = map(int, input().split())

cnt = 1
buf = []
if n < b:
    buf.append(int(a * n / b) - a * (int(n / b)))

while True:
    if n / b > 10 ** 6:
        break
    x = cnt * b - 1
    if n < x :
        break
    calc = int(a * x / b) - a * (int(x / b))
    if calc > max(buf):
        buf.append(calc)
    cnt += 1
    
if n / b > 10 ** 6 and n >= b:
    buf.append(int(a * (b - 1) / b) - a * (int((b - 1) / b)))

ans = max(buf)
print(ans)

### FIXED CODE ###

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

cnt = 1
buf = []
if n < b:
    buf.append(int(a * n / b) - a * (int(n / b)))
else:
    buf.append(int(a * (b - 1) / b) - a * (int((b - 1) / b)))
    

while True:
    if n / b > 10 ** 6:
        break
    x = cnt * b - 1
    if n < x :
        break
    calc = int(a * x / b) - a * (int(x / b))
    if calc > max(buf):
        buf.append(calc)
    cnt += 1
    
if n / b > 10 ** 6 and n >= b:
    buf.append(int(a * (b - 1) / b) - a * (int((b - 1) / b)))

ans = max(buf)
print(ans)
N = int(input())

if N % 3 == 0:

    cr = ["abb","a.c","ddc"]

    ans = [ ["."] * N for i in range(N) ]

    for i in range(N):

        for j in range(N):

            ans[i][j] = cr[i % 3][j % 3]

    for i in range(N):
        print ("".join(ans[i]))

elif N % 4 == 0:

    cr = ["abee","abff","ccgh","ddgh"]

    ans = [ ["."] * N for i in range(N) ]

    for i in range(N):

        for j in range(N):

            ans[i][j] = cr[i % 4][j % 4]

    for i in range(N):
        print ("".join(ans[i]))

else:
    print (-1)

    if N == 5:
        a = []
        a[1] += 1

### FIXED CODE ###


N = int(input())


if N == 3:

    ans = [".aa","b..","b.."]

    for i in ans:
        print (i)

elif N >= 4:

    four = ["abcc","abdd","hhfg","eefg"]
    five = ["ahhgg","ai..f","bi..f","b.jje","ccdde"]
    six = ["add.ff","a.ce..","bbce..",".ffadd","e..a.c","e..bbc"]
    seven = [".iijjkk","fadd...","fa.c...","gbbc...","g...add","h...a.c","h...bbc"]

    ans = [ ["."] * N for i in range(N) ]

    now = 0
    while N-now > 7:

        for i in range(4):
            for j in range(4):

                ans[i+now][j+now] = four[i][j]

        now += 4

    if N - now == 4:
        for i in range(4):
            for j in range(4):

                ans[i+now][j+now] = four[i][j]

    elif N - now == 5:
        for i in range(5):
            for j in range(5):

                ans[i+now][j+now] = five[i][j]

    elif N - now == 6:
        for i in range(6):
            for j in range(6):

                ans[i+now][j+now] = six[i][j]

    else:
        for i in range(7):
            for j in range(7):

                ans[i+now][j+now] = seven[i][j]

    for i in range(N):
        print ("".join(ans[i]))

else:
    print (-1)
n = int(input())
a = [int(x) for x in input().split()]

def odd_positive(List, n):
    sum_a = 0
    cost = 0
    for a in List:
        nextsum = sum_a + a
        if i & 1 and nextsum <= 0:
            cost = - nextsum + 1
            sum_a = 1
        elif (not i & 1) and nextsum >= 0:
            cost = nextsum + 1
            sum_a = -1
    return cost


def odd_negative(List, n):
    sum_a = 0
    cost = 0
    for a in List:
        nextsum = sum_a + a
        if i & 1 and nextsum >= 0:
            cost = nextsum + 1
            sum_a = -1
        elif (not i & 1) and nextsum <= 0:
            cost = - nextsum + 1
            sum_a = 1
    return cost
    
ans = min(odd_positive(a,n), odd_negative(a,n)) 
print(ans)


### FIXED CODE ###

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

def odd_positive(List):
    sum_a = 0
    cost = 0
    i = 0
    for a in List:
        i += 1
        sum_a += a
        if i & 1 and sum_a <= 0:
            cost += - sum_a + 1
            sum_a = 1
        elif (not i & 1) and sum_a >= 0:
            cost += sum_a + 1
            sum_a = -1
    return cost


def odd_negative(List):
    sum_a = 0
    cost = 0
    i = 0
    for a in List:
        i += 1
        sum_a += a
        if i & 1 and sum_a >= 0:
            cost += sum_a + 1
            sum_a = -1
        elif (not i & 1) and sum_a <= 0:
            cost += - sum_a + 1
            sum_a = 1
    return cost
    
ans = min(odd_positive(a), odd_negative(a)) 
print(ans)
A,B =map(int,input().split())
if A-B == 0:
    print(A+"=="+B)
    elif A > B:
        print(A+">"+B)
    print(A+"<"+B)


### FIXED CODE ###

A,B =map(int,input().split())
if A-B == 0:
    print("a == b")
elif A >= B:
    print("a > b")
else:
    print("a < b")