#include using namespace std; using ll = long long; int main(){ int N;cin >> N; if(!(1 <= N && N <= 2 * 100000)){ return 1; } while(N--){ string _T, _u, _L; cin >> _T >> _u >> _L; for(int i = 0;i < _T.size();i++){ if(_T[i] == '.' && i + 3 != _T.size()){ return 1; } if(!(('0' <= _T[i] && _T[i] <= '9') || _T[i] == '.')){ cout<<_T[i]<