mod = 1000000007 eps = 10**-9 def main(): import sys input = sys.stdin.readline def XY(n): if n == 1: return 0, 0 for i in range(1, 10**5, 2): if i ** 2 >= n: k = i break C = k**2 - (k-2)**2 RD = k ** 2 LD = RD - C // 4 LU = LD - C // 4 RU = LU - C // 4 if n <= RU: return k//2, k//2 - (RU - n) elif RU < n <= LU: return -(k//2) + (LU - n), k//2 elif LU < n <= LD: return -(k//2), -(k//2) + (LD - n) else: return k//2 - (RD - n), -(k//2) def move(sx, sy, tx, ty): assert (abs(tx - sx) + abs(ty - sy))%2 == 0 ret = [] if abs(tx - sx) & 1: ret.append("ULRL") sx -= 1 sy += 1 if tx < sx: for _ in range((sx - tx) // 2): ret.append("LLRL") if tx > sx: for _ in range((tx - sx) // 2): ret.append("RRLR") if ty < sy: for _ in range((sy - ty) // 2): ret.append("DDUD") if ty > sy: for _ in range((ty - sy) // 2): ret.append("UUDU") return ret s, t = map(int, input().split()) sx, sy = XY(s) tx, ty = XY(t) ans = ["RLR"] sx += 1 if abs(s-t) % 2 == 1: ans.extend(move(sx, sy, tx, ty)) else: if s % 2 == 1: ans.extend(move(sx, sy, -1, 0)) ans.append("RRU") ans.extend(move(1, 1, tx, ty)) else: ans.extend(move(sx, sy, -1, 1)) ans.append("DDLDDRUU") # sample 3 ans.extend(move(0, -1, tx, ty)) ANS = "".join(ans) assert len(ANS) <= 200000 print(0) print(len(ANS)) print(ANS) if __name__ == '__main__': main()