Question
You are given an absolute working directory and the argument of a `cd` command. Return the absolute directory the shell would land in once `.`, `..`, and repeated separators are collapsed.
```python
def solve(raw: str) -> str:
...
def run_case(case: dict) -> str:
return solve(case["stdin"])
```
## Requirements
- Line 1 is an absolute working directory; line 2 is the argument, which may be absolute or relative.
- An absolute argument discards the working directory and is resolved from the root.
- `.` keeps the current directory, `..` moves to the parent, and climbing past the root stays at `/`.
- Only a whole segment equal to `.` or `..` is special; a name such as `file..name` remains one segment.
- Return the path with one leading slash, no repeated or trailing separators, and `/` alone when nothing remains.
- Starting from one absolute directory, repeated parent moves cannot escape the root.
- Symlinks, permissions, and `~` expansion are out of scope.
- Do not append a trailing newline to the returned string; return the value exactly once.