file1 contains multiple alphabetic sequences:
AETYUIOOILAKSJ EAYEURIOPOSIDK RYXURIAJSKDMAO URITORIEJAHSJD YWQIAKSJDHFKCM HAJSUDIDSJSIAJ AJDHDPFDIXSIBJ JAQIAUXCNC
With awk + grep pipeline:
awk
grep
awk '{ pat=sprintf("%*s", int($0)-1, ""); gsub(" ", ".", pat); printf "^%s%s\n", pat, substr($0, length) }' file2 | grep -f- file1
The output:
AETYUIOOILAKSJ RYXURIAJSKDMAO URITORIEJAHSJD JAQIAUXCNCVUFO