#include<bits/stdc++.h> using namespace std; int main() {cout<<"6"<<endl; cout<<"6"<<endl; cout<<"9"<<endl; return 0; }