Efficient Typing on a Game Boy Many old Game Boy games often required string input from the user. However, there was no keyboard. This was handled by presenting the user with a "keyboard screen" like so:



The 'character pointer' would begin on letter A. The user would navigate to each desired character with the D-Pad's four buttons (UP, DOWN, LEFT and RIGHT), then press BUTTON A to append it to the final string. 

Please note: 


The grid wraps around, so pressing UP whilst on letter A would take you to T.
The 'character pointer' stays put after appending a letter


The Challenge

The above keyboard has options to change case and is an irregular shape. So, for simplicity, in this challenge we will use the following keyboard (the bottom right is ASCII char 32, a space):

A B C D E F G
H I J K L M N
O P Q R S T U
V W X Y Z .


Typing on keyboards like this is extremely slow - so, to make this easier, your task is to write a program which tells the user the fastest possible way to type a given string. If there are multiple fastest ways, you only need to show one.

The output key should be:


&gt; for RIGHT
&lt; for LEFT
^ for UP
v for DOWN
. for BUTTON A (append current letter to string)


For example, when given the string DENNIS, the solution would look like this:

&gt;&gt;&gt;.&gt;.&gt;&gt;v..&gt;&gt;.&gt;&gt;&gt;v.


Rules / Details


Please remember, the grid wraps around!
You may submit a full program or a function, as long as it takes the initial string and produces a solution string. Whitespace / trailing newlines are irrelevant as long as the output is correct.
You can assume input will only consist of characters typable on the specified keyboard, but it may be empty.
This is code-golf, so the shortest code wins. Standard code-golf loopholes apply.


Test Cases

There are usually multiple solutions of the same length. For each test case, I've included the optimum length, and an example. You don't need to print the length in your answer, just the solution.

FLP.TKC  -&gt;  25 steps:  &lt;&lt;.&lt;v.&lt;&lt;&lt;v.&lt;&lt;&lt;v.^.&lt;&lt;^.&lt;^.
MOYLEX   -&gt;  23 steps:  &lt;&lt;v.&gt;&gt;v.&gt;&gt;&gt;v.&gt;^^.^.&lt;&lt;^.
FEERSUM  -&gt;  18 steps:  &lt;&lt;.&lt;..&lt;vv.&gt;.&gt;&gt;.&lt;^.
MEGO     -&gt;  14 steps:  &lt;&lt;v.&lt;^.&gt;&gt;.&gt;vv.

A CAT    -&gt;  17 steps:  .&lt;^.&gt;&gt;&gt;v.&lt;&lt;.&lt;&lt;vv.
BOB      -&gt;  10 steps:  &gt;.&lt;vv.&gt;^^.

(space)  -&gt;  3 steps:   &lt;^.
(empty)  -&gt;  0 steps:   (empty)


You can view my testcase generator on repl.it - please notify me if there are any bugs.

Thank you everyone for the submissions! User ngn is currently the winner with 61 bytes, but if anyone can find a shorter solution, the little green tick can be moved ;)
JavaScript (ES6), 147 bytes

s=&gt;s.replace(/./g,c=&gt;(q=p,p="AHOVBIPWCJQXDKRYELSZFMY.GNU ".indexOf(c),"&lt;&lt;&lt;&gt;&gt;&gt;".substring(3,((p&gt;&gt;2)+10-(q&gt;&gt;2))%7)+["","v","vv","^"][p-q&amp;3]+"."),p=0)


An interesting behaviour of substring is that it exchanges the arguments if the second is less than the first. This means that if I calculate the optimal number of left/right presses as a number between -3 and 3, I can add 3, and take the substring of &lt;&lt;&lt;&gt;&gt;&gt; starting at 3 and I will get the correct number of arrows. Meanwhile the down/up presses are simply handled by looking up an array using a bitwise and of the difference in rows with 3; this way is slightly shorter as there are fewer array elements.