#include using namespace std; using ll = long long; int main(){ return 1; 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(!(('1' <= _T[i] && _T[i] <= '9') || _T[i] == '.')){ return 1; } } for(int i = 0;i < _u.size();i++){ if(_u[i] == '.' && i + 3 != _u.size()){ return 1; } if(!(('1' <= _u[i] && _u[i] <= '9') || _u[i] == '.')){ return 1; } } for(int i = 0;i < _L.size();i++){ if(_L[i] == '.' && i + 3 != _L.size()){ return 1; } if(!(('1' <= _L[i] && _L[i] <= '9') || _L[i] == '.')){ return 1; } } if(find(_T.begin(), _T.end(), '.') == _T.end()){ return 1; } if(find(_u.begin(), _u.end(), '.') == _u.end()){ return 1; } if(find(_L.begin(), _L.end(), '.') == _L.end()){ return 1; } _T.erase(find(_T.begin(), _T.end(), '.')); _u.erase(find(_u.begin(), _u.end(), '.')); _L.erase(find(_L.begin(), _L.end(), '.')); ll T = stoi(_T); ll u = stoi(_u); ll L = stoi(_L); if(!(0 < T && T < 10000)){ return 1; } if(!(0 < u && u < 10000)){ return 1; } if(!(0 < L && L < 100000)){ return 1; } } return 0; }