Background
----------
In another dimension, there exist two immortal brothers: Solomon and Goromon. As sworn loyal subjects to the time elemental, Chronixus, both Solomon and Goromon were granted the power to create temporal folds. By sliding through these temporal folds, one can gain entry to parallel dimensions where time moves relatively faster or slower.

Goromon grew dissatisfied and one day betrayed Chronixus by stealing the Temporal Crystal, an artifact used to maintain the time continuum. Chronixus summoned Solomon and gave him the task of tracking down Goromon and retrieving the Temporal Crystal.

Using a map given to Solomon by Chronixus, you must find Goromon's precise location.

Mission Details
---------------
The map is represented as a 2D array. See the example below:

```python
map_example = [[1,3,5],[2,0,10],[-3,1,4],[4,2,4],[1,1,5],[-3,0,12],[2,1,12],[-2,2,6]]
```
Here are what the values of each subarray represent:
- **Time Dilation:** With each additional layer of time dilation entered, time slows by a factor of `2`. At layer `0`, time passes normally. At layer `1`, time passes at half the rate of layer `0`. At layer `2`, time passes at half the rate of layer `1`, and therefore one quarter the rate of layer `0`.
- **Directions** are as follow: `0 = North, 1 = East, 2 = South, 3 = West`
- **Distance Traveled:** This represents the distance traveled relative to the current time dilation layer. See below:

```
The following are equivalent distances (all equal a Standard Distance of 100):
Layer: 0, Distance: 100
Layer: 1, Distance: 50
Layer: 2, Distance: 25
```
For the `mapExample` above:
```
mapExample[0] -> [1,3,5]
1 represents the level shift of time dilation
3 represents the direction
5 represents the distance traveled relative to the current time dilation layer

Solomon's new location becomes [-10,0]

mapExample[1] -> [2,0,10]
At this point, Solomon has shifted 2 layers deeper.
He is now at time dilation layer 3.
Solomon moves North a Standard Distance of 80.
Solomon's new location becomes [-10,80]

mapExample[2] -> [-3,1,4]
At this point, Solomon has shifted out 3 layers.
He is now at time dilation layer 0.
Solomon moves East a Standard Distance of 4.
Solomon's new location becomes [-6,80]
```
Your function should return Goromon's `[x,y]` coordinates.

For `mapExample`, the correct output is `[346,40]`.

Additional Technical Details
----------------------------
- Inputs are always valid.
- Solomon begins his quest at time dilation level `0`, at `[x,y]` coordinates `[0,0]`.
- Time dilation level at any point will always be `0` or greater.
- Standard Distance is the distance at time dilation level `0`.
- For given distance `d` for each value in the array: `d >= 0`.
- Do not mutate the input

**Note from the author:** I made up this story for the purpose of this kata. Any similarities to any fictitious persons or events are purely coincidental.

If you enjoyed this kata, be sure to check out [my other katas](https://www.codewars.com/users/docgunthrop/authored).

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

def _disabled_input(*args, **kwargs):
    raise RuntimeError("input() is disabled in callable mode")
builtins.input = _disabled_input

ns = {"__name__": "__judge__"}  # prevent if __name__ == "__main__" blocks
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = "\n#Directions player can move: North is positive y axis, East is positive x axis\nclass Direction:\n    North = 0;  East = 1;  South = 2;  West = 3\n#-----end classDirection\n\n\n#The data of the hero of the story\nclass Solomon:\n    curDir = Direction.North    #default direction is set to facing north\n    xLoc = 0            # East and West directions (East is positive x)\n    yLoc = 0            # North and South directions (Nortn is positive y)\n    timeDepth = 0       #Current depth of the traveler\n    timeFactor = 2      #This factor is constant and is based on game definition\n#-----end class\n\n\n\n\ndef unpackWayPoint(wayPoint):\n    amountTimeDialation = wayPoint[0]\n    newDir = wayPoint[1]\n    distToTravel = wayPoint[2]\n\n    return amountTimeDialation, newDir, distToTravel\n#-----end function\n\n\n\ndef updateHeroDistance(hero, dirOfTravel, trueDistToMove):\n\n    if dirOfTravel == Direction.North:\n        hero.yLoc += trueDistToMove\n    elif dirOfTravel == Direction.South:\n        hero.yLoc -= trueDistToMove\n    elif dirOfTravel == Direction.East:\n        hero.xLoc += trueDistToMove\n    else:\n        hero.xLoc -= trueDistToMove\n\n#-----end fucntion\n\n#a small helper debugger function\ndef printDist(hero):\n    print(('''Hero's location: [''', hero.xLoc, ',', hero.yLoc, ']'))\n\n\ndef solomons_quest(wayPoints):\n    hero = Solomon()\n\n    for nextStop in wayPoints:\n        amtTimeDialation, dirOfTravel, amtToTravel = unpackWayPoint(nextStop)\n\n        #update hero based on the waypoint data\n        hero.timeDepth += amtTimeDialation\n        trueDistToMove = (hero.timeFactor**hero.timeDepth)*amtToTravel  #dist is based on depth and factor\n        updateHeroDistance(hero, dirOfTravel, trueDistToMove)\n\n    #pack data in a list\n    heroFinalLoc = [hero.xLoc, hero.yLoc]\n\n    return heroFinalLoc\n#-----end function\n"
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

_target = None
_fn_name = 'solomons_quest'
if _fn_name:
    if "Solution" in ns:
        try:
            _obj = ns["Solution"]()
            if hasattr(_obj, _fn_name):
                _target = getattr(_obj, _fn_name)
        except Exception:
            _target = None
    if _target is None and _fn_name in ns and callable(ns[_fn_name]):
        _target = ns[_fn_name]
# Fallback: if there's exactly one user-defined function, use it
if _target is None:
    _cands = [v for k, v in ns.items() if callable(v) and getattr(v, "__module__", "") in ("__judge__", "__main__")]
    _user_funcs = [c for c in _cands if getattr(c, "__name__", "").startswith("_") is False]
    if len(_user_funcs) == 1:
        _target = _user_funcs[0]
if _target is None:
    raise RuntimeError(f"Could not resolve callable '{_fn_name}'")

_raw = sys.stdin.read().strip()
if _raw:
    _parsed = json.loads(_raw)
    if isinstance(_parsed, dict):
        _kwargs = _parsed.get("kwargs", {})
        _args = _parsed.get("args", [])
    else:
        _args, _kwargs = _parsed, {}
else:
    _args, _kwargs = [], {}
if not isinstance(_args, (list, tuple)):
    _args = [_args]
_res = _target(*_args, **_kwargs)
try:
    sys.stdout.write(repr(_res) + "\n")
except Exception:
    pass

```

Measured memory_bytes: 5942