Problem Description

You get a string of commands with letters L,R,U,D. Start at (0,0). Print final x y.

Input Format

One line command string.

Output Format

Two integers: x y.

Sample Test Case

Input:
LURDUR
Output:
0 1

Constraints

Length up to 2e5.

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next