from collections import deque N = int(input()) P = list(map(int, input().split())) def is_sorted(q): xs = list(q) for i in range(len(xs)): if xs[i] != i: return False return True q = deque(P) ans = [] while 1: if len(ans) > 100: break if q[0] == 0 and is_sorted(q): break if q[0] < q[1]: ans.append('S') q[0], q[1] = q[1], q[0] else: ans.append('R') x = q.popleft() q.append(x) print(*ans, sep='')