# [MATL], <s>64</s> <s>58</s> <s>57</s> <s>50</s> <s>46</s> <s>40</s> 37 bytes nQ:64+cPFF3Y62#fwh2-GQY)&vYsPHH$6#Xu) [Try it online!] **Explanation** % Implicitly grab the input nQ % Determine the number of inputs and add 1 (N) : % Create an array from [1...N] 64+ % Add 64 (converts this to ASCII codes [65....65+N]) c % Convert from ASCII codes to actual characters (['A'...Nth_letter]) P % Reverse the string FF % Push the array [0, 0] to the stack 3Y6 % Push the 2D matrix [1 1 1; 1 0 1; 1 1 1] to the stack 2#f % Get the rows, columns of the 1's in the previous matrix wh % Horizontally concatenate these row/column indices 2- % Subtract two from each of them so that we get values between -1 and 1 GQY) % Grab the input, add one (1-based indexing) and index into this row/col matrix &v % Vertically concatenate the [0 0] with this new matrix Ys % Compute the cumulative sum down the columns which yields 2D coordinates for each % successive letter P % Flip the result (this is to work around a bug in MATL) HH$6#Xu % Compute the unique rows (sorted) and find the first occurrence of each unique row ) % Use this to index into the initial character array. Since we flipped % the initial array of letters and the input to the unique function we % will get the LAST letter to occur at each point % Implicitly display the result [MATL]: https://github.com/lmendo/MATL [Try it online!]: https://tio.run/nexus/matl#@58XaGVmop0c4OZmHGlmpJxWnmGk6x4YqalWFlkc4OGhYqYcUar5/3@0iY65jqGOGRga6BjrGMYCAA