#include int main() { int n; scanf("%d", &n); int i, j; char s[8]; for (j = 0; j < n; j++) { scanf("%s", s); for (i = 0; s[i] == '0'; i++); if (s[i] == '\0') printf("0"); else for (; s[i] != '\0'; printf("%c", s[i]), i++); printf("\n"); } return 0; }