def int_str(val, keyspace = "suTaWp6Z7P2zFYn5IMQUfqr4wAgeldRDVyvkS801HGjNJCbBKotE9x3hmiXcOL"): 
    """ Turn a positive integer into a string.
    Keyspace can be anything you like - this was just shuffled letters and numbers, but...
    each character must occur only once. """
    assert len(set(keyspace)) == len(keyspace) 
    assert val >= 0
    out = ""
    while val > 0:
        val, digit = divmod(val, len(keyspace))
        out += keyspace[digit]
    return out[::-1]