print "This is a program that converts a base 10 number to any base less than base 10, up to 4 places."
x = input ("Enter the number in base 10: ")
y = input ("Enter the base you wish to convert to: ")
a = y*y*y*y
b = y*y*y
c = y*y
d = y
e = 1

fourthed = x/a
cubed = x%a/b
squared = (x%a)%b/c
base = (((x%a)%b)%c)/d
ones = ((((x%a)%b)%c)%d)

print "Here it is in base " + str(y) + ": " + str(fourthed) + str(cubed) + str(squared) + str(base) + str(ones)

