function main(input){
    var input = input.split('\n')
    var input_list = input[1].split(' ')
    var a = input_list[0]
    var b = input_list[1]
    var c = input_list[2]

    while(a%2==0 &&b%2==0 && c%2 ==0){
        a = a/2
        b = b/2
        c = c/2
    }
    console.log('%d %d %d', a,b,c)
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))