Код:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
class Program
{
static void Main(string[] args)
{
var temp = File.ReadAllLines("input.txt", Encoding.ASCII);
string s = temp[0];
int n = int.Parse(temp[1]);
if ((s == "front") && (n == 1))
{
File.WriteAllLines("output.txt", new string[] { "L" });
}
else if ((s == "front") && (n == 2))
{
File.WriteAllLines("output.txt", new string[] { "R" });
}
else if ((s == "back") && (n == 1))
{
File.WriteAllLines("output.txt", new string[] { "R" });
}
else if ((s == "back") && (n == 2))
{
File.WriteAllLines("output.txt", new string[] { "L" });
}
}
}