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 = [] for i in reversed(range(N-1)): while 1: if q[0] == i: if q[1] == i+1: break ans.append('S') q[0], q[1] = q[1], q[0] ans.append('R') q.append(q.popleft()) else: ans.append('R') q.append(q.popleft()) print(*ans, sep='')