#include <iostream>
#include <sstream>
#include <string>

int main()
{
    std::istringstream stm( "A: 10\n"
                            "B: 20\n"
                            "C: 30\n" ) ;

    std::string text ;
    int number ;
    while( stm >> text >> number ) std::cout << number << '\n' ;
}
