Replace string with integers in types of message