The topic of the conversation should be expressed in one word within the conversation. So instead of making your model guess from a bunch of different combinations of chars, try instead to train your model to guess what word within the conversation is the topic. You probably shouldn't plug in the P1, P2, ... thing because the person speaking is not relevant.
As a supervised learning problem, you could give a model (neural network for example, there are a lot of those used in problems like these) a bunch of conversations and the topic. Make sure that the topic is a word in the conversation because we don't want ambiguous words floating around as labels. I am not quite sure how to measure error for backpropagation, etc. But I'm sure you can figure it out with more research.