#include<bits/stdc++.h>
using namespace std;
using ll=long long;
using pi=pair<int,int>;
using vi=vector<int>;
#define mp make_pair
#define eb emplace_back
#define x first
#define y second
#define sz(x)int((x).size())
#define all(x)(x).begin(),(x).end()
#define rep(i,a,b)for(int i=(a);i<(b);i++)
#define per(i,a,b)for(int i=(b)-1;i>=(a);i--)
bool ckmin(auto&a,auto b){return b<a?a=b,1:0;}
bool ckmax(auto&a,auto b){return b>a?a=b,1:0;}
mutex dbg_mtx;
#ifdef LOCAL
auto&operator<<(auto&o,pair<auto,auto>p){return o<<"("<<p.x<<", "<<p.y<<")";}
auto operator<<(auto&o,auto x)->decltype(x.end(),o){o<<"{";int i=0;for(auto&e:x)o<<","+!i++<<e;return o<<"}";}
#define debug(X...)cerr<<"["#X"]: ",[](auto...$){lock_guard<mutex> lock(dbg_mtx); ((cerr<<$<<"; "),...)<<endl;}(X);
#else
#define debug(...){}
#endif
int cases_completed = 0;
int num_cases;
atomic_int nxt_case;
struct solution {
// == TEMPLATE START ==
stringstream out;
int case_id;
explicit solution(int _case_id) : case_id(_case_id) {}
void on_finish() {
const lock_guard<mutex> lock(dbg_mtx);
cases_completed++;
float percent = (100.0 * cases_completed) / num_cases;
cerr << fixed << setprecision(1);
cerr << "Case #" << case_id + 1 << " completed, " << cases_completed << " / " << num_cases << " (" << percent << "%)" << endl;
}
void write() {
cout << "Case #" << case_id + 1 << ": " << out.str();
}
// == TEMPLATE END ==
// == VARIABLES START ==
// == VARIABLES END ==
// == METHODS START ==
void read() {
}
void solve() {
}
// == METHODS END ==
};
constexpr int NUM_PROCSESORS = 14;
vector<solution> solutions;
vector<thread> processors;
void run() {
while (true) {
int i = nxt_case.fetch_add(1);
if (i >= num_cases) {
return;
}
solutions[i].solve();
solutions[i].on_finish();
}
}
signed main() {
cin.tie(0)->sync_with_stdio(0);
cin >> num_cases;
solutions.reserve(num_cases);
rep(i, 0, num_cases) {
solutions.eb(i);
solutions.back().read();
}
cerr << "Input read, starting processors" << endl;
rep(i, 0, NUM_PROCSESORS) {
processors.emplace_back(run);
}
for (auto &processor : processors) {
processor.join();
}
cerr << "Finished processing, writing output" << endl;
for (auto &solution : solutions) {
solution.write();
}
return 0;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKdXNpbmcgbGw9bG9uZyBsb25nOwp1c2luZyBwaT1wYWlyPGludCxpbnQ+Owp1c2luZyB2aT12ZWN0b3I8aW50PjsKI2RlZmluZSBtcCBtYWtlX3BhaXIKI2RlZmluZSBlYiBlbXBsYWNlX2JhY2sKI2RlZmluZSB4IGZpcnN0CiNkZWZpbmUgeSBzZWNvbmQKI2RlZmluZSBzeih4KWludCgoeCkuc2l6ZSgpKQojZGVmaW5lIGFsbCh4KSh4KS5iZWdpbigpLCh4KS5lbmQoKQojZGVmaW5lIHJlcChpLGEsYilmb3IoaW50IGk9KGEpO2k8KGIpO2krKykKI2RlZmluZSBwZXIoaSxhLGIpZm9yKGludCBpPShiKS0xO2k+PShhKTtpLS0pCmJvb2wgY2ttaW4oYXV0byZhLGF1dG8gYil7cmV0dXJuIGI8YT9hPWIsMTowO30KYm9vbCBja21heChhdXRvJmEsYXV0byBiKXtyZXR1cm4gYj5hP2E9YiwxOjA7fQoKbXV0ZXggZGJnX210eDsKI2lmZGVmIExPQ0FMCmF1dG8mb3BlcmF0b3I8PChhdXRvJm8scGFpcjxhdXRvLGF1dG8+cCl7cmV0dXJuIG88PCIoIjw8cC54PDwiLCAiPDxwLnk8PCIpIjt9CmF1dG8gb3BlcmF0b3I8PChhdXRvJm8sYXV0byB4KS0+ZGVjbHR5cGUoeC5lbmQoKSxvKXtvPDwieyI7aW50IGk9MDtmb3IoYXV0byZlOngpbzw8IiwiKyFpKys8PGU7cmV0dXJuIG88PCJ9Ijt9CiNkZWZpbmUgZGVidWcoWC4uLiljZXJyPDwiWyIjWCJdOiAiLFtdKGF1dG8uLi4kKXtsb2NrX2d1YXJkPG11dGV4PiBsb2NrKG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luZywgd3JpdGluZyBvdXRwdXQiIDw8IGVuZGw7CgogICAgZm9yIChhdXRvICZzb2x1dGlvbiA6IHNvbHV0aW9ucykgewogICAgICAgIHNvbHV0aW9uLndyaXRlKCk7CiAgICB9CgogICAgcmV0dXJuIDA7Cn0KCg==