Help me in solving LUCKYSEVEN problem

My issue

why am i not getting the output

My code

#include <iostream>
#include <string>
using namespace std;

int main() {
	// your code goes here
string S[9];
for(int i=0;i<9;i++){
cin>>S[i];
}

cout << S[6]<<endl;


	return 0;
}

Learning course: 500 difficulty rating
Problem Link: Lucky Seven Practice Problem in - CodeChef

I think your code is wrong.

Input is 10 length string not 9.
Here is the modified code in the input lines string s; cin>>s;