s, t = map(int, input().split()) def f(n): if n % 2 == 1: if n == 1: return [] ans = [] k = 0 while (2 * k + 1) ** 2 < n: k += 1 if (2 * k - 1) ** 2 + 1 <= n < 2 * (k - 1) ** 2 + 2 * k: for _ in range(k - 1): ans.append(3) ans.append(0) ans.append(0) ans.append(1) now = (2 * k - 1) ** 2 + 2 for _ in range(now, n, 2): ans.append(1) ans.append(1) elif (2 * k - 1) ** 2 + 2 * k <= n < (2 * k - 1) ** 2 + 4 * k: for _ in range(k): ans.append(0) ans.append(1) now = (2 * k - 1) ** 2 + 2 * k for _ in range(now, n, 2): ans.append(2) ans.append(2) elif (2 * k - 1) ** 2 + 4 * k <= n < (2 * k - 1) ** 2 + 6 * k: for _ in range(k): ans.append(1) ans.append(2) now = (2 * k - 1) ** 2 + 4 * k for _ in range(now, n, 2): ans.append(3) ans.append(3) else: for _ in range(k): ans.append(2) ans.append(3) now = (2 * k - 1) ** 2 + 6 * k for _ in range(now, n, 2): ans.append(0) ans.append(0) return ans else: ans = [] k = 0 while (2 * k + 1) ** 2 < n: k += 1 if (2 * k - 1) ** 2 + 6 * k >= n: for _ in range(1, k + 1): ans.append(3) ans.append(0) now = (2 * k + 1) ** 2 + 1 for _ in range(now, n, -1): ans.append(2) return ans ans.append(3) ans.append(3) if (2 * k - 1) ** 2 + 4 * k >= n: for _ in range(1, k): ans.append(2) ans.append(3) ans.append(2) now = (2 * k - 1) ** 2 + 6 * k for _ in range(now, n, -1): ans.append(1) return ans ans.append(2) ans.append(2) if (2 * k - 1) ** 2 + 2 * k >= n: for _ in range(1, k): ans.append(1) ans.append(2) ans.append(1) now = (2 * k - 1) ** 2 + 4 * k for _ in range(now, n, -1): ans.append(0) return ans ans.append(1) ans.append(1) for _ in range(1, k): ans.append(0) ans.append(1) ans.append(0) now = (2 * k - 1) ** 2 + 2 * k for _ in range(now, n, -1): ans.append(3) 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))