#!/bin/bash

f(){
# The following 2 lines of this function body may exist as a standalone script:
a=(_ {A..I} {1..26} {J..Z} {A..Z})
echo ${a[36#$1]}
}

for test in {1..26} {A..Z}; do
    echo input=$test, output=$(f $test)
done
    