#include <cstdlib>
#include <iostream>
 
using namespace std;
 
const int END = true, NEND = false;									
																	
int forout(const char* s, int n, bool end)
	{							
		for( int i=0 ; i<n ; i++ )
		{
			cout << s << ((i+1 != n || !end)? ", ": (end? "\n" : ""));	
		}
	}
 
int main(){
	int yellow, green;		
	cin >> yellow >> green;
	if(yellow == 0){																				
		if(green != 0)
		{						
			cout << "P: rr X rr\n";
			cout << "F1: ";
			forout("rr", green, END);		
		}
		else
		{								
			cout << "P: Один из родителей будет обладать генотипом rr, а второй может быть каким угодною.\n";
		}
	}
	else if(green == 0){			
		cout << "P: rr x RR\n";			
		cout << "F1: ";
		forout("Rr", green+yellow, END);			
 	}
	else
	{
		cout << "P: rr x Rr\n";
		cout << "F1: ";
		forout("Rr", yellow, NEND);	
		forout("rr", green, END);
	}
	}