For eg. if we have two strings 2 and 10, 10 will come first if we order lexicographically.

The very trivial sol will be to repeat a character n number of time.

```
eg. 2 can be encoded as aa

10 as aaaaaaaaaa

This way the lex order is same as the numeric one.

```

But, is there a more elegant way to do this?