In this Kata, you will be given directions and your task will be to find your way back. 
```Perl
solve(["Begin on Road A","Right on Road B","Right on Road C","Left on Road D"]) = ['Begin on Road D', 'Right on Road C', 'Left on Road B', 'Left on Road A']
solve(['Begin on Lua Pkwy', 'Right on Sixth Alley', 'Right on 1st Cr']) =  ['Begin on 1st Cr', 'Left on Sixth Alley', 'Left on Lua Pkwy']
```
More examples in test cases. 
Good luck!
Please also try [Simple remove duplicates](https://www.codewars.com/kata/5ba38ba180824a86850000f7)
from collections import deque

def solve(arr):
    flip = {'Left': 'Right', 'Right': 'Left'}
    
    # Build the prefixes
    directions = deque([
        flip.get(s, s) 
        for s in [s.split()[0] for s in arr]
    ])
    directions.reverse()
    directions.rotate(1)
    
    # Get the rest of the directions    
    streets = [' '.join(s.split()[1:]) for s in arr][::-1]
    
    # Zip and concatenate each pair 
    return [f'{direction} {street}' for direction, street in zip(directions, streets)]
from collections import deque

def solve(arr):
    flip = {'Left': 'Right', 'Right': 'Left'}
    
    # Build the prefixes
    directions = deque([
        flip.get(s, s) 
        for s in [s.split()[0] for s in arr]
    ])
    directions.reverse()
    directions.rotate(1)
    
    # Get the rest of the directions    
    streets = [' '.join(s.split()[1:]) for s in arr][::-1]
    
    # Zip and concatenate each pair 
    return [f'{direction} {street}' for direction, street in zip(directions, streets)]