Question: we have an app running in bluemix under two different routes:
myapp.shortname.com
myapp.reallyreallyreallyreallylongname.com

but the SSO service does not work with myapp.shortname.com giving an error:

> 
> CWOAU0062E: The OAuth service provider could not redirect the request
>  because the redirect URI was not valid. Contact your system
>  administrator to resolve the problem.
> 
> 
> 

is it possible to support two routes or do we now have to run two NodeJS apps?

Answer: 
That's easy, just define a dictionary which maps characters to their replacement.

```
>>> replacers = {'A':'Z', 'T':'U', 'H':'F'}
>>> inp = raw_input()
A T H X
>>> ''.join(replacers.get(c, c) for c in inp)
'Z U F X'

```

I don't know where exactly you want to go and whether case-sensitivity matters, or if there's a more general rule to determine the replacement character that you did not tell us - but this should get you started.

*edit*:
an explanation was requested:

`(replacers.get(c, c) for c in inp)` is a generator which spits out the following items for the example input:

```
>>> [replacers.get(c, c) for c in inp]
['Z', ' ', 'U', ' ', 'F', ' ', 'X']

```

For each character `c` in the input string `inp` we ge the replacement character from the `replacers` dictionary, or the character itself if it cannot be found in the dictionary. The default value is the second argument passed to `replacers.get`. 

Finally, `''.join(some_iterable)` builds a string from all the items of an iterable (in our case, the generator), glueing them together with the string `join` is being called on in between. Example:

```
>>> 'x'.join(['a', 'b', 'c'])
'axbxc'

```

In our case, the string is empty, which has the effect of simply concatenating all the items in the iterable.
timgeb has a great solution; alternatively, you could also use what's on [this page of the docs](https://docs.python.org/3/library/random.html) and use a `for` loop to assign a random integer to each letter, and store it in a dictionary (see `randint`).

This would be more helpful if you want it to change every time you run your program.