#include <bits/stdc++.h>
using namespace std;

int main() {
	// your code goes here
	string s="jahid";
	do{
		cout<<s<<endl;
	}while(next_permutation(s.begin(),s.end()));
	
	return 0;
}