Given a string and a 2D shift array, apply all left/right shifts and return the resulting string.
You are given a string s and an array of shifts shift where each element is [direction, amount]:
s
shift
[direction, amount]
direction = 0
amount
direction = 1
Each shift is applied sequentially to the current string.