import math


def factorize(val_to_fac):
    """Returns prime factorization as a string"""
    anwser = ""

    # Divides out as many 2's as possible, appending them to the anwser
    while val_to_fac % 2 == 0: 
        anwser += "2 "
        val_to_fac /= 2
    
    # Going through all odd numbers from 3 to root of value 
    for i in range(3, math.ceil(val_to_fac/2), 2):
        # If the odd number divides value, add to anwser
        while val_to_fac % i == 0:
            anwser += (str(i) + " ")
            val_to_fac /= i

    return anwser