Var inputFile, outputFile: text; num, digit, sum: integer;
Function DigitSum(n: integer): integer; Begin DigitSum := 0; While n > 0 do Begin Digit := n mod 10; DigitSum := DigitSum + Digit; n := n div 10; End; End;
Begin Assign(inputFile, 'input.txt'); Reset(inputFile);
Var
inputFile, outputFile: text;
num, digit, sum: integer;
Function DigitSum(n: integer): integer;
Begin
DigitSum := 0;
While n > 0 do
Begin
Digit := n mod 10;
DigitSum := DigitSum + Digit;
n := n div 10;
End;
End;
Begin
Assign(inputFile, 'input.txt');
Reset(inputFile);
Assign(outputFile, 'output.txt');
Rewrite(outputFile);
While not Eof(inputFile) do
If (sum >= 12) and (sum <= 34) thenBegin
Readln(inputFile, num);
sum := DigitSum(num);
Writeln(outputFile, num);
End;
Close(inputFile);
Close(outputFile);
End.