Language: C++

#include <bits/stdc++.h>
#include<math.h>
#include <iostream>
#include <vector>
#include <queue>
string dfs(int i){
  if(i==N){
    return 
using namespace std;

int main() {
  int N;
  cin>>N; 
  if(N==1){
    cout<<a<<endl;
  }
  else if(N==2){
    cout<<aa<<endl;
    cout<<ab<<endl;    
  }
  else if(N==3){
    cout<<aaa<<endl;
    cout<<aab<<endl;
    cout<<aba<<endl;
    cout<<abb<<endl;
  }
  else if(N==4){
    cout<<aaaa<<endl;
    cout<<aaab<<endl;
    cout<<aaba<<endl;
    cout<<aabb<<endl;
    cout<<abaa<<endl;
    cout<<abab<<endl;
    cout<<abba<<endl;
    cout<<abbb<<endl;
  }
  else if(N==5){
    cout<<aaaaa<<endl;
    cout<<aaaab<<endl;
    cout<<aaaba<<endl;
    cout<<aaabb<<endl;
    cout<<aabaa<<endl;
    cout<<aabab<<endl;
    cout<<aabba<<endl;
    cout<<aabbb<<endl;
    cout<<abaaa<<endl;
    cout<<abaab<<endl;
    cout<<ababa<<endl;
    cout<<ababb<<endl;
    cout<<abbaa<<endl;
    cout<<abbab<<endl;
    cout<<abbba<<endl;
    cout<<abbbb<<endl;
  }
  else if(N==6){
    cout<<aaaaaa<<endl;
    cout<<aaaaab<<endl;
    cout<<aaaaba<<endl;
    cout<<aaaabb<<endl;
    cout<<aaabaa<<endl;
    cout<<aaabab<<endl;
    cout<<aaabba<<endl;
    cout<<aaabbb<<endl;
    cout<<aabaaa<<endl;
    cout<<aabaab<<endl;
    cout<<aababa<<endl;
    cout<<aababb<<endl;
    cout<<aabbaa<<endl;
    cout<<aabbab<<endl;
    cout<<aabbba<<endl;
    cout<<aabbbb<<endl;
    cout<<abaaaa<<endl;
    cout<<abaaab<<endl;
    cout<<abaaba<<endl;
    cout<<abaabb<<endl;
    cout<<ababaa<<endl;
    cout<<ababab<<endl;
    cout<<ababba<<endl;
    cout<<ababbb<<endl;
    cout<<abbaaa<<endl;
    cout<<abbaab<<endl;
    cout<<abbaba<<endl;
    cout<<abbabb<<endl;
    cout<<abbbaa<<endl;
    cout<<abbbab<<endl;
    cout<<abbbba<<endl;
    cout<<abbbbb<<endl;
  }
  else if(N==7){
    cout<<aaaaaaa<<endl;
    cout<<aaaaaab<<endl;
    cout<<aaaaaba<<endl;
    cout<<aaaaabb<<endl;
    cout<<aaaabaa<<endl;
    cout<<aaaabab<<endl;
    cout<<aaaabba<<endl;
    cout<<aaaabbb<<endl;
    cout<<aaabaaa<<endl;
    cout<<aaabaab<<endl;
    cout<<aaababa<<endl;
    cout<<aaababb<<endl;
    cout<<aaabbaa<<endl;
    cout<<aaabbab<<endl;
    cout<<aaabbba<<endl;
    cout<<aaabbbb<<endl;
    cout<<aabaaaa<<endl;
    cout<<aabaaab<<endl;
    cout<<aabaaba<<endl;
    cout<<aabaabb<<endl;
    cout<<aababaa<<endl;
    cout<<aababab<<endl;
    cout<<aababba<<endl;
    cout<<aababbb<<endl;
    cout<<aabbaaa<<endl;
    cout<<aabbaab<<endl;
    cout<<aabbaba<<endl;
    cout<<aabbabb<<endl;
    cout<<aabbbaa<<endl;
    cout<<aabbbab<<endl;
    cout<<aabbbba<<endl;
    cout<<aabbbbb<<endl;
    cout<<abaaaaa<<endl;
    cout<<abaaaab<<endl;
    cout<<abaaaba<<endl;
    cout<<abaaabb<<endl;
    cout<<abaabaa<<endl;
    cout<<abaabab<<endl;
    cout<<abaabba<<endl;
    cout<<abaabbb<<endl;
    cout<<ababaaa<<endl;
    cout<<ababaab<<endl;
    cout<<abababa<<endl;
    cout<<abababb<<endl;
    cout<<ababbaa<<endl;
    cout<<ababbab<<endl;
    cout<<ababbba<<endl;
    cout<<ababbbb<<endl;
    cout<<abbaaaa<<endl;
    cout<<abbaaab<<endl;
    cout<<abbaaba<<endl;
    cout<<abbaabb<<endl;
    cout<<abbabaa<<endl;
    cout<<abbabab<<endl;
    cout<<abbabba<<endl;
    cout<<abbabbb<<endl;
    cout<<abbbaaa<<endl;
    cout<<abbbaab<<endl;
    cout<<abbbaba<<endl;
    cout<<abbbabb<<endl;
    cout<<abbbbaa<<endl;
    cout<<abbbbab<<endl;
    cout<<abbbbba<<endl;
    cout<<abbbbbb<<endl;
  }
  else if(N==8){
    cout<<aaaaaaaa<<endl;
    cout<<aaaaaaab<<endl;
    cout<<aaaaaaba<<endl;
    cout<<aaaaaabb<<endl;
    cout<<aaaaabaa<<endl;
    cout<<aaaaabab<<endl;
    cout<<aaaaabba<<endl;
    cout<<aaaaabbb<<endl;
    cout<<aaaabaaa<<endl;
    cout<<aaaabaab<<endl;
    cout<<aaaababa<<endl;
    cout<<aaaababb<<endl;
    cout<<aaaabbaa<<endl;
    cout<<aaaabbab<<endl;
    cout<<aaaabbba<<endl;
    cout<<aaaabbbb<<endl;
    cout<<aaabaaaa<<endl;
    cout<<aaabaaab<<endl;
    cout<<aaabaaba<<endl;
    cout<<aaabaabb<<endl;
    cout<<aaababaa<<endl;
    cout<<aaababab<<endl;
    cout<<aaababba<<endl;
    cout<<aaababbb<<endl;
    cout<<aaabbaaa<<endl;
    cout<<aaabbaab<<endl;
    cout<<aaabbaba<<endl;
    cout<<aaabbabb<<endl;
    cout<<aaabbbaa<<endl;
    cout<<aaabbbab<<endl;
    cout<<aaabbbba<<endl;
    cout<<aaabbbbb<<endl;
    cout<<aabaaaaa<<endl;
    cout<<aabaaaab<<endl;
    cout<<aabaaaba<<endl;
    cout<<aabaaabb<<endl;
    cout<<aabaabaa<<endl;
    cout<<aabaabab<<endl;
    cout<<aabaabba<<endl;
    cout<<aabaabbb<<endl;
    cout<<aababaaa<<endl;
    cout<<aababaab<<endl;
    cout<<aabababa<<endl;
    cout<<aabababb<<endl;
    cout<<aababbaa<<endl;
    cout<<aababbab<<endl;
    cout<<aababbba<<endl;
    cout<<aababbbb<<endl;
    cout<<aabbaaaa<<endl;
    cout<<aabbaaab<<endl;
    cout<<aabbaaba<<endl;
    cout<<aabbaabb<<endl;
    cout<<aabbabaa<<endl;
    cout<<aabbabab<<endl;
    cout<<aabbabba<<endl;
    cout<<aabbabbb<<endl;
    cout<<aabbbaaa<<endl;
    cout<<aabbbaab<<endl;
    cout<<aabbbaba<<endl;
    cout<<aabbbabb<<endl;
    cout<<aabbbbaa<<endl;
    cout<<aabbbbab<<endl;
    cout<<aabbbbba<<endl;
    cout<<aabbbbbb<<endl;
    cout<<abaaaaaa<<endl;
    cout<<abaaaaab<<endl;
    cout<<abaaaaba<<endl;
    cout<<abaaaabb<<endl;
    cout<<abaaabaa<<endl;
    cout<<abaaabab<<endl;
    cout<<abaaabba<<endl;
    cout<<abaaabbb<<endl;
    cout<<abaabaaa<<endl;
    cout<<abaabaab<<endl;
    cout<<abaababa<<endl;
    cout<<abaababb<<endl;
    cout<<abaabbaa<<endl;
    cout<<abaabbab<<endl;
    cout<<abaabbba<<endl;
    cout<<abaabbbb<<endl;
    cout<<ababaaaa<<endl;
    cout<<ababaaab<<endl;
    cout<<ababaaba<<endl;
    cout<<ababaabb<<endl;
    cout<<abababaa<<endl;
    cout<<abababab<<endl;
    cout<<abababba<<endl;
    cout<<abababbb<<endl;
    cout<<ababbaaa<<endl;
    cout<<ababbaab<<endl;
    cout<<ababbaba<<endl;
    cout<<ababbabb<<endl;
    cout<<ababbbaa<<endl;
    cout<<ababbbab<<endl;
    cout<<ababbbba<<endl;
    cout<<ababbbbb<<endl;
    cout<<abbaaaaa<<endl;
    cout<<abbaaaab<<endl;
    cout<<abbaaaba<<endl;
    cout<<abbaaabb<<endl;
    cout<<abbaabaa<<endl;
    cout<<abbaabab<<endl;
    cout<<abbaabba<<endl;
    cout<<abbaabbb<<endl;
    cout<<abbabaaa<<endl;
    cout<<abbabaab<<endl;
    cout<<abbababa<<endl;
    cout<<abbababb<<endl;
    cout<<abbabbaa<<endl;
    cout<<abbabbab<<endl;
    cout<<abbabbba<<endl;
    cout<<abbabbbb<<endl;
    cout<<abbbaaaa<<endl;
    cout<<abbbaaab<<endl;
    cout<<abbbaaba<<endl;
    cout<<abbbaabb<<endl;
    cout<<abbbabaa<<endl;
    cout<<abbbabab<<endl;
    cout<<abbbabba<<endl;
    cout<<abbbabbb<<endl;
    cout<<abbbbaaa<<endl;
    cout<<abbbbaab<<endl;
    cout<<abbbbaba<<endl;
    cout<<abbbbabb<<endl;
    cout<<abbbbbaa<<endl;
    cout<<abbbbbab<<endl;
    cout<<abbbbbba<<endl;
    cout<<abbbbbbb<<endl;
  }
  
  
}



Compiler output:
a.cc:6:1: error: 'string' does not name a type; did you mean 'stdin'?
    6 | string dfs(int i){
      | ^~~~~~
      | stdin