Mapping lettered states to numbers