int main() {
    char phone[11];
    int x;

    scanf("%10s %d", phone, &x);

    if (x == -1) {
        printf("%s", phone);
        return 0;
    }
    else if (x >= 0 && x <= 9) {
        printf('%c', *(phone + x));
        return 0;
    }
    else {
        printf("ERROR");
        return 1;
    }
}
print the xth element of phone when x is between 0 and 9, inclusive