#include <iostream>
using namespace std;
#define AMNT 15
int main() {
int p, k;
int current, previous;
cin >> p;
while ( p--) {
cin >> k;
int isl = 0;
cin >> current; // ввод 1-го элемента последовательности
previous = current;
for ( int j = 1; j < AMNT ; j++ ){
cin >> current; //ввод остальных элементов
if ( current > previous ) {
isl++;
}
previous = current;
}
cout << k << " " << isl << endl;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwojZGVmaW5lIEFNTlQgMTUKIAppbnQgbWFpbigpIHsKCWludCBwLCBrOwoJaW50IGN1cnJlbnQsIHByZXZpb3VzOyAKICAgIGNpbiA+PiBwOwoJd2hpbGUgKCBwLS0pIHsKCQljaW4gPj4gazsgCgkJaW50IGlzbCA9IDA7IAoJCWNpbiA+PiBjdXJyZW50OwkJLy8g0LLQstC+0LQgMS3Qs9C+INGN0LvQtdC80LXQvdGC0LAg0L/QvtGB0LvQtdC00L7QstCw0YLQtdC70YzQvdC+0YHRgtC4CgkJcHJldmlvdXMgPSBjdXJyZW50OyAJCgkJZm9yICggaW50IGogPSAxOyBqIDwgQU1OVCA7IGorKyApewoJCQljaW4gPj4gY3VycmVudDsJCSAvL9Cy0LLQvtC0INC+0YHRgtCw0LvRjNC90YvRhSDRjdC70LXQvNC10L3RgtC+0LIKCQkJaWYgKCBjdXJyZW50ID4gcHJldmlvdXMgKSB7IAoJCQkJaXNsKys7CgkJCX0KCQkJcHJldmlvdXMgPSBjdXJyZW50OwoJCX0KCQljb3V0IDw8IGsgPDwgIiAiIDw8IGlzbCA8PCBlbmRsOwoJfQoJcmV0dXJuIDA7Cn0=
NAoxIDAgMCAxIDEgMiAyIDEgMSAwIDEgMiAyIDEgMSAwCjIgMCAxIDIgMyA0IDMgMiAxIDIgMyA0IDMgMiAxIDAKMyAwIDEgMCAxIDAgMSAwIDEgMCAxIDAgMSAwIDEgMAo0IDAgMSAyIDMgNCA1IDYgNyA2IDUgNCAzIDIgMSAw
4
1 0 0 1 1 2 2 1 1 0 1 2 2 1 1 0
2 0 1 2 3 4 3 2 1 2 3 4 3 2 1 0
3 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
4 0 1 2 3 4 5 6 7 6 5 4 3 2 1 0