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

How to get this test to pass?
#include <stdio.h>  
  
  
  
  
  
  
int main() {  
        char str1[11];  
        int num;  
    while(scanf("%s\n", str1)==1){  
        scanf("%d", &num);  
            if (num==-1){  
                    printf("%s\n", str1);  
  
             }else if (num >=0 && num <=9){  
                     printf("%c\n", str1[num]);  
  
             }else if (num < -1 || num >9){  
                  printf("ERROR\n");  
  
             }  
    }  
    return 0;  
  
  
}  