function processInput() {
    // Получаем значение из элемента input
    let inputValue = document.getElementById("myInput").value;
    let mass = inputValue.split(' ');
    let count =0;
    for(let i =0; i< mass.length; i++){
        count++;
    }
    let mas = new Array(count);
    for(let i =0; i< mas.length; i++){
        mas[i] = new Array(2);
    }
let ind =0;
    mass.forEach(element => {
        let m = element.split(':').map(Number);
        for(let j =0; j<2; j++){
            mas[ind][j] = m[j];
        }
        ind++;
    });
    console.log(mas);
let a =0;
let code ="";
while (a!==count-1){
 let min = 1000;
 let versh = 0;
 let poisk =0;
 for(let i =0; i< count; i++){
    poisk =0;
    for(let j =0; j< 2; j++){
        if(mas[i][j] < min && mas[i][j]!==0 && poisk===0){
            min = mas[i][1];
           
            versh = i;
            for(let r=0; r<count; r++){
                for(let t =0; t< 1; t++){
                   if(mas[r][t] ===min){
                    poisk =1;
                    min = 9999;
                   }
                }
            }
        }
    }
    if(i=== mas.length -1){
        if(poisk === 0){
            code = code + mas[versh][0] + " ";
            mas[versh][1] = 0;
            mas[versh][0] = 0;
           
             a++;
        }
    }
 }
}
console.log(code);
document.getElementById("result").textContent = code;
}