#include <stdio.h>

int main() {

    char phone[11];
    scanf("%s", phone);


    int val = 1;
    int num;
    while (val == 1) {
        val = scanf("%d", &num);
        if (num == -1) {
            printf("%s\n", phone);
        } else if (num >= 0 && num <= 9) {
            char arg = phone[num];
            printf("%c\n", arg);
        } else {
            printf("ERROR");
            return 1;
        }
        
        
    

    }
    return 0;

}
why does my code raise this error?

c_helper.py:148: in _t
    self.assertEqual(stdout, expected_stdout)
E   AssertionError: '1\n6\n4161234567\n3\n3' != '1\n6\n4161234567\n3'
E     1
E     6
E     4161234567
E   - 3
E     3