#include "scales.h"
void init(int T) {}
void orderCoins() {
int w[] = {0,0,0,0,0,0}, w1[] = {getLightest(1,2,3),getMedian(1,2,3),0}, w2[] = {getLightest(4,5,6),getMedian(4,5,6),0}, i;
w1[2] = 6-w1[0]-w1[1], w2[2] = 15-w2[0]-w2[1];
int p1 = 0, p2 = 0;
w[0] = getLightest(w1[0],w1[1],w2[0]);
if(w[0]==w1[0]) p1=1;
else p2 = 1;
for(i = 1; p1<3&&p2<3; i++) {
w[i] = getMedian(w[0], w1[p1],w2[p2]);
if(w[i]==w1[p1]) p1++;
else p2++;
}
while(p1<3)
w[i++] = w1[p1++];
while(p2<3)
w[i++] = w2[p2++];
answer(w);
}