maximum number of sorted subset of 13 length octal-string wile be 1948.then this can be solve by 1948194826 dp. but you have to pre calculate the every combination of concatanation.