#include <iostream>
#include <string>
using namespace std;
int main() {
// your code goes here
string line("that cag moved");
for(int a = 3; a < line.length(); a++)
{
if(line.at(a) == 'g')
{
cout << "Found a g at location " << a << '\n';
}
else
{
cout << line.at(a) << '\n';
}
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CgkvLyB5b3VyIGNvZGUgZ29lcyBoZXJlCglzdHJpbmcgbGluZSgidGhhdCBjYWcgbW92ZWQiKTsKCWZvcihpbnQgYSA9IDM7IGEgPCBsaW5lLmxlbmd0aCgpOyBhKyspCgl7CiAgICAgIGlmKGxpbmUuYXQoYSkgPT0gJ2cnKQogICAgICB7CiAgICAgICAgICBjb3V0IDw8ICJGb3VuZCBhIGcgYXQgbG9jYXRpb24gIiA8PCBhIDw8ICdcbic7CiAgICAgIH0KICAgICAgZWxzZQogICAgICB7CiAgICAgICAgICBjb3V0IDw8IGxpbmUuYXQoYSkgPDwgJ1xuJzsKICAgICAgfQoJfQoKCQoJcmV0dXJuIDA7Cn0=