A sportsman starts from point x_{start} = 0 and runs to point with coordinate x_{finish} = m (on a straight line). Also, the sportsman can jump — to jump, he should first take a run of length of not less than s meters (in this case for these s meters his path should have no obstacles), and after that he can jump over a length of not more than d meters. Running and jumping is permitted only in the direction from left to right. He can start andfinish a jump only at the points with integer coordinates in which there are no obstacles. To overcome some obstacle, it is necessary to land at a point which is strictly to the right of this obstacle.

On the way of an athlete are n obstacles at coordinates x_1, x_2, ..., x_{n}. He cannot go over the obstacles, he can only jump over them. Your task is to determine whether the athlete will be able to get to the finish point.


-----Input-----

The first line of the input containsd four integers n, m, s and d (1 ≤ n ≤ 200 000, 2 ≤ m ≤ 10^9, 1 ≤ s, d ≤ 10^9) — the number of obstacles on the runner's way, the coordinate of the finishing point, the length of running before the jump and the maximum length of the jump, correspondingly.

The second line contains a sequence of n integers a_1, a_2, ..., a_{n} (1 ≤ a_{i} ≤ m - 1) — the coordinates of the obstacles. It is guaranteed that the starting and finishing point have no obstacles, also no point can have more than one obstacle, The coordinates of the obstacles are given in an arbitrary order.


-----Output-----

If the runner cannot reach the finishing point, print in the first line of the output "IMPOSSIBLE" (without the quotes).

If the athlete can get from start to finish, print any way to do this in the following format:  print a line of form "RUN X>" (where "X" should be a positive integer), if the athlete should run for "X" more meters;  print a line of form "JUMP Y" (where "Y" should be a positive integer), if the sportsman starts a jump and should remain in air for "Y" more meters. 

All commands "RUN" and "JUMP" should strictly alternate, starting with "RUN", besides, they should be printed chronologically. It is not allowed to jump over the finishing point but it is allowed to land there after a jump. The athlete should stop as soon as he reaches finish.


-----Examples-----
Input
3 10 1 3
3 4 7

Output
RUN 2
JUMP 3
RUN 1
JUMP 2
RUN 2

Input
2 9 2 3
6 4

Output
IMPOSSIBLE

Difficulty: interview

Starter code:

Solutions:
n, m, s, d = list(map(int, input().split()))

beg = [float('-inf')]
end = [float('-inf')]

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

for x in sorted(a):
	if (x - end[-1] > s + 1):
		beg.append(x)
		end.append(x)
	else:
		end[-1] = x

last = 0
R = []
J = []

for i in range(1, len(beg)):
	R.append(beg[i] - 1 - last)
	last = (beg[i] - 1)
	
	J.append(end[i] + 1 - last)
	last = (end[i] + 1)

ok = True
for x in J:
	if (x > d):
		ok = False
for x in R:
	if (x < s):
		ok = False


if ok:
	for i in range(len(R)):
		print('RUN', R[i])
		print('JUMP', J[i])
	if (last < m):
		print('RUN', m - last)
else:
	print('IMPOSSIBLE')


n, m, s, d = list(map(int, input().split()))
a = list(map(int, input().split()))
a.sort()
if a[0] - 1 < s:
    print('IMPOSSIBLE')
    return
strategy = []
i = 0
stand_point = 0
while i < n:
    strategy.append(a[i] - stand_point - 1)
    stand_point = a[i] - 1
    j = i + 1
    if j != n:
        a2, a1 = a[j], a[i]
    while j < n:
        if a2 - a1 - 2 < s:
            if a2 - a[i] + 2 > d:
                print('IMPOSSIBLE')
                return
            j += 1
            if j != n:
                a1 = a2
                a2 = a[j]
            continue
        else:
            strategy.append(a1 - a[i] + 2)
            i = j
            stand_point = a[i - 1] + 1
            break
    else:
        #print(stand_point, strategy_run, strategy_jump)
        if d >= a[-1] - stand_point + 1 and strategy[-1] >= s:
            strategy.append(a[-1] - stand_point + 1)
        else:
            print('IMPOSSIBLE')
            return
        i = j
        stand_point = a[i - 1] + 1

if m - stand_point != 0:
    strategy.append(m - stand_point)
turn_flag = True
for i in strategy:
    if turn_flag:
        print('RUN', i)
    else:
        print('JUMP', i)
    turn_flag = not turn_flag


import sys

def solve():
    n, m, s, d = [int(x) for x in input().split()]
    obstacles = [int(x) for x in input().split()]
    obstacles.sort()
    if obstacles[0] <= s: return False
    pieces = [[obstacles[0], obstacles[0]]]
    for x in obstacles:
        if pieces[-1][1] + s + 2 > x:
            pieces[-1][1] = x
        else:
            if pieces[-1][1] - pieces[-1][0] + 2 > d: return False
            pieces.append([x, x])
    if pieces[-1][1] - pieces[-1][0] + 2 > d: return False
    pos = 0
    for piece in pieces:
        sys.stdout.write('RUN ' + str(piece[0] - pos - 1) + '\n')
        sys.stdout.write('JUMP ' + str(piece[1] - piece[0] + 2) + '\n')
        pos = piece[1] + 1
    if pos < m:
        sys.stdout.write('RUN ' + str(m - pos) + '\n')
    return True

if not solve():
    print('IMPOSSIBLE')


n, m, s, d = map(int, input().split())
A = sorted(list(map(int, input().split())))

# Intervals
inv = []
prev = -1
for i in range(len(A)):
    if A[i] < m:
        inv.append((prev, A[i]))
        prev = A[i]
    else:
        inv.append((prev, m))
        break
if A[-1] < m:
    inv.append((A[-1], m))

output = [inv[-1]]

# Use of intervals
last = inv[-1]
for i in range(len(inv) - 2, -1, -1):
    a, b = inv[i], last
    if a[1] - a[0] >= s + 2 and b[0] - a[1] <= d - 2:
        last = inv[i]
        output.append(last)
output = output[::-1]

if m < A[0]:
    print("RUN " + str(m))
elif last[0] != -1 or A[0] <= s:
    print("IMPOSSIBLE")
else:
    last = 0
    for i in range(1, len(output)):
        a, b = output[i - 1], output[i]
        print("RUN " + str(a[1] - a[0] - 2))
        print("JUMP " + str(b[0] - a[1] + 2))
        last = b[0] + 1
    if last < m:
        print("RUN " + str(m - last))

import itertools


class SolutionImpossible(Exception):
    pass


blocks_cnt, finish, min_sprint, max_jump = [int(x) for x in input().split()]


def read_blocks_coords():
    it = (int(x) for x in input().split())
    return (x for x in it if x < finish)


# TODO: код можно сократить за счет избавления от лишней записи в `_grouper._current_key`
def _grouper(value):
    if _grouper._prev_value is not None:
        # после прыжка мы приземляемся ЗА препятствием, учитываем это
        if value - _grouper._prev_value - 1 <= min_sprint:
            # расстояние между препятствиями слишком мало
            # чтобы между ними приземляться, и затем разогнаться для нового прыжка, считаем их за одно
            _current_key = _grouper._current_key
        else:
            _current_key = id(value)
    else:
        # первое вхождение, ставим данные по умолчанию
        _current_key = id(_grouper)

    _grouper._prev_value = value
    _grouper._current_key = _current_key

    return _current_key


_grouper._prev_value = None
_grouper._current_key = None


def check_chunk(run_from, block=None):
    if block is None:
        return

    next_run_from = block[-1] + 1  # следующая за преградой позиция (точка приземления)
    if next_run_from - block[0] >= max_jump:
        # если преграда слишком длинная, то мы не можем ее пересечь
        raise SolutionImpossible

    if abs(run_from - block[0]) <= min_sprint:
        # нет возможности для разбега
        raise SolutionImpossible


def solve_chunk(run_from, block=None):
    if block is not None:
        run_len = block[0] - run_from - 1  # добегаем ДО преграды
        jump_len = block[-1] - block[0] + 2  # прыгаем ЗА нее
        print((
            "RUN {run_len}\n"
            "JUMP {jump_len}".format(
                run_len=run_len,
                jump_len=jump_len,
            )
        ))

    else:
        run_len = finish - run_from
        if run_len > 0:
            print("RUN {run_len}".format(run_len=run_len))


def main():
    # некоторые препятствия могут находиться так близко, что между ними нет возможности разогнаться
    # считаем такие препятствия за одно
    blocks = (list(g) for k, g in itertools.groupby(sorted(read_blocks_coords()), key=_grouper))

    chunks = []

    run_from = 0
    while True:
        block = next(blocks, None)

        chunk = (run_from, block)
        check_chunk(*chunk)

        chunks.append(chunk)

        if block is None:
            break

        # после прыжка мы приземляемся ЗА препятствием, учитываем это
        run_from = block[-1] + 1

    #print(chunks)

    for chunk in chunks:
        solve_chunk(*chunk)


def __starting_point():
    try:
        main()
    except SolutionImpossible:
        print("IMPOSSIBLE")

__starting_point()

num_barriers, finish, min_run, max_jump = tuple(map(int, input().split()))

barriers = list(map(int, input().split())) + [-1]
barriers.sort()

for i in range(len(barriers) - 1):
    if barriers[i + 1] - barriers[i] <= min_run + 1:
        barriers[i] = (0, barriers[i] + 1, barriers[i + 1] - 1)  # nope
    else:
        barriers[i] = (1, barriers[i] + 1, barriers[i + 1] - 1)  # ok

barriers[len(barriers) - 1] = (1, barriers[len(barriers) - 1] + 1, finish)

if not barriers:
    pass
elif not barriers[0][0]:
    print('IMPOSSIBLE')
else:
    commands = []
    pos = 0

    for tpe, st, en in barriers:
        if tpe:
            if pos != st and st - pos <= max_jump:
                commands.append('JUMP %s' % (st - pos))
            elif pos != st:
                print('IMPOSSIBLE')
                break
            if en - st:
                commands.append('RUN %s' % (en - st))
            pos = en
    else:
        print('\n'.join(commands))


n,m,s,d=map(int,input().split())
x=sorted(map(int,input().split()))+[m+s+1]
cur=l=0
ans=[]
while l<m:
    r=min(x[cur]-1,m)
    ans+=['RUN '+str(r-l)]
    if r==m: break
    if r-l<s: ans=['IMPOSSIBLE']; break
    t=x[cur]+1
    while x[cur+1]-1-t<s: cur+=1; t=x[cur]+1
    if t-r>d: ans=['IMPOSSIBLE']; break
    ans+=['JUMP '+str(t-r)]
    l=t;cur+=1
print('\n'.join(ans))

n, m, s, d=map(int, input().split())
x = sorted(map(int, input().split())) + [m + s + 1]
cur = l = 0
ans = []
while l < m:
    r = min(x[cur] - 1, m)
    ans += ['RUN ' + str(r - l)]
    if r == m: break
    if r - l < s: ans = ['IMPOSSIBLE']; break
    t = x[cur] + 1
    while x[cur + 1] - 1 - t < s: cur += 1; t = x[cur] + 1
    if t - r > d: ans = ['IMPOSSIBLE']; break
    ans += ['JUMP ' + str(t - r)]
    l = t;cur += 1
print('\n'.join(ans))

f = lambda: map(int, input().split())
n, m, s, d = f()
p, x, z = [], -1, 1
for y in sorted(f()) + [m + 1]:
    if y - x > s + 1 or y > m or x < 0:
        u = x - z + 2
        v = y - x - 2
        if u > d or v < s and x < 0:
            p = ['IMPOSSIBLE']
            break
        if u: p += ['JUMP ' + str(u)]
        if v: p += ['RUN ' + str(v)]
        z = y
    x = y
print('\n'.join(p))

n,m,s,d=list(map(int,input().split()))
x=sorted(map(int,input().split()))+[m+s+1]
cur=l=0
ans=[]
while l<m:
    r=min(x[cur]-1,m)
    ans+=['RUN '+str(r-l)]
    if r==m: break
    if r-l<s: ans=['IMPOSSIBLE']; break
    t=x[cur]+1
    while x[cur+1]-1-t<s: cur+=1; t=x[cur]+1
    if t-r>d: ans=['IMPOSSIBLE']; break
    ans+=['JUMP '+str(t-r)]
    l=t;cur+=1
print('\n'.join(ans))


n,m,s,d=list(map(int,input().split()))
x=sorted(map(int,input().split()))+[m+s+1]
cur=l=0
ans=[]
while l<m:
    r=min(x[cur]-1,m)
    ans+=['RUN '+str(r-l)]
    if r==m: break
    if r-l<s: ans=['IMPOSSIBLE']; break
    t=x[cur]+1
    while x[cur+1]-1-t<s: cur+=1; t=x[cur]+1
    if t-r>d: ans=['IMPOSSIBLE']; break
    ans+=['JUMP '+str(t-r)]
    l=t;cur+=1
print('\n'.join(ans))


n, m ,s, d = [int(i) for i in input().split()]  # m is the end point
# s is length of run, d is the max jump distance
A = [-1] + sorted([int(i) for i in input().split()]) + [m+1]
ans_size = 2 * 10**5
ans = [0 for i in range(4*ans_size)]

# use 0 to indicate run an 1 to indicate jump

def obstacle():
    run = -1
    jump = -1
    top = 0 # flag where are we at the dp
    for i in range(1,n+1):
        if s + 2 <= A[i] - A[i-1]:
            if jump != -1:
                if A[i-1] + 1 - jump <= d and top > 0 and ans[top-1][0] == 0 and ans[top-1][1] >= s:
                    ans[top] = (1, A[i-1]+1-jump)
                    top += 1
                else:
                    print("IMPOSSIBLE")
                    return
            ans[top] = (0, A[i] - A[i-1]-2) # run
            top += 1
            jump = A[i] - 1 # jumping point
    if A[n] + 1 - jump <= d and top > 0 and ans[top-1][0] == 0 and ans[top-1][1] >= s:
        ans[top] = (1, A[n]+1 - jump)
        top += 1
    else:
        print("IMPOSSIBLE")
        return
    if m != A[n] + 1:
        ans[top] = (0, m-A[n]-1)
        top += 1
    for i in range(top):
        if ans[i][0]:
            print("JUMP", ans[i][1])
        else:
            print("RUN", ans[i][1])
obstacle()


n, m, s, d = list(map(int, input().split()))
a = list(map(int, input().split()))
a.sort()
points = [0, a[0] - 1]
if d == 1 or a[0] - 1 < s:
    print("IMPOSSIBLE")
    return
for i in range(0, n):
    if a[i] - a[i - 1] - 2 < s:
        if a[i] + 1 - points[-1] > d:
            print("IMPOSSIBLE")
            return
    else:
        points.append(a[i - 1] + 1)
        points.append(a[i] - 1)

points.append(a[-1] + 1)
for i in range(1, len(points)):
    if i % 2 == 1:
        print("RUN", points[i] - points[i - 1])
    else:
        print("JUMP", points[i] - points[i - 1])
if a[-1] + 1 != m:
    print("RUN", m - 1 - a[-1])