s, t = map(int, input().split()) def f(n): if n % 2 == 1: ans = [] k = 0 while (2 * (k + 1) + 1) ** 2 <= n: ans.append(3) ans.append(0) k += 1 now = (2 * k + 1) ** 2 if now == n: return ans ans.append(0) ans.append(1) now += 2 k += 1 while now < n and now < (2 * k - 1) ** 2 + 2 * k - 1: ans.append(1) ans.append(1) now += 2 if now == n: return ans while now < n and now < (2 * k - 1) ** 2 + 4 * k - 1: ans.append(2) ans.append(2) now += 2 if now == n: return ans while now < n and now < (2 * k - 1) ** 2 + 6 * k - 1: ans.append(3) ans.append(3) now += 2 if now == n: return ans while now < n: ans.append(0) ans.append(0) now += 2 return ans else: ans = [3] k = 1 while (2 * k - 1) ** 2 + 1 < n: ans.append(0) ans.append(3) k += 1 now = (2 * k - 1) ** 2 + 1 if now == n: return ans k -= 1 while now > n and now > (2 * k - 1) ** 2 + 6 * k + 1: ans.append(2) ans.append(2) now -= 2 if now == n: return ans ans.append(2) ans.append(1) now -= 2 while now > n and now > (2 * k - 1) ** 2 + 4 * k + 1: ans.append(1) ans.append(1) now -= 2 if now == n: return ans ans.append(1) ans.append(0) now -= 2 while now > n and now > (2 * k - 1) ** 2 + 2 * k + 1: ans.append(0) ans.append(0) now -= 2 if now == n: return ans ans.append(0) ans.append(3) now -= 2 while now > n: ans.append(3) ans.append(3) now -= 2 return ans ps, pt = f(s), f(t) ones = len(ps) // 2 + len(pt) // 2 + 2 ans = [(t + 2) % 4 for t in reversed(ps)] if s % 2 == 0: ans.append(3) else: ans.append(0) ans.append(2) ans.append(0) ones += 1 if ones % 2 == 1: ans.append(1) ans.append(3) if t % 2 == 0: ans.append(1) else: ans.append(2) ans += pt print(0) print(len(ans)) assert len(ans) <= 2 * 10 ** 5 print(''.join('RULD'[a] for a in ans))