string variable preventing class data from printing : Whenever I try this:

    x = input()
    showstat(x)

    def showstat(y):
        print(y.thing)

It comes back as an error, I know *why* it doesn't work; the input is a string, and therefore would be read as:

    print("foo".thing)

but I don't know how to change it's data type in order to make it function properly.