Exercise: sort mixed string

In a file we have the following strings: A1 B1 A27 A3 ... each string has a single letter at the beginning and then a number.

Sort them first based on the first letter and among values with the same leading letter sort them according to the numbers so the above values would be in the following order:

A1 A3 A27 B1

File:

A1 A27 C1 B1 B12 A38 B3 A3