#include <stdio.h>
#include <stdlib.h>
int n;
typedef struct LNode
{
int data;
struct LNode* next;
}LNode;
void initLinkList(LNode* pL)
{
int i = 0;
LNode* pR, * pS;
scanf("%d", &n);
pR = pL;
for (i = 0; i < n; i++)
{
pS = (LNode*)malloc(sizeof(LNode));
pS->next = NULL;
scanf("%d", &pS->data);
pR->next = pS;
pR = pS;
}
}
int opLinkList(LNode* pL)
{
int i, j = 0, flag = 1;
LNode* pR;
pR = pL;
scanf("%d", &i);
if (i < 1 || i > n)
{
flag = 0;
return flag;
}
while (j <= i && pR != NULL)
{
j++;
pR = pR->next;
}
if (pR == NULL)
flag = 0;
return flag;
}
int main()
{
LNode* pL;
pL = (LNode*)malloc(sizeof(LNode));
pL->next = NULL;
initLinkList(pL);
if (opLinkList(pL) == 1)
printf("ok");
else
printf("error");
return 0;
}