DNN: Mapping from fixed length string to fixed length string

I have a situation where I’d like a DNN to learn the [unknown] mapping between two fixed-sized strings. For example:

"-+--++-++-" -> "968"
"+-+-+-+-+-" -> "185"
"-+-+-+++--" -> "766"

I can take the input string and convert it into the numerical inputs required by the DNN but I’m not sure how to structure the output layer.

Assuming the output string is 3 characters long:

model = models.Sequential()
model.add(layers.Dense(x1, activation='relu', input_shape=(N,)))
model.add(layers.Dense(x2, activation='relu'))
model.add(layers.Dense(3, activation='???'))
  1. I’ll need a way to convert the 3 outputs back into characters.
  2. I can’t seem to figure out which activation function I should use.
  3. I’ll also need to choose appropriate optimizer and loss functions

    model.compile(optimizer='???', loss='???')