using System;
using System.IO;
using System.Text;

namespace The_Intriguing_Obsession
{
    internal class Program
    {
        private const int mod = 998244353;
        private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024*10), Encoding.ASCII, false, 1024*10);
        private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024*10), Encoding.ASCII, 1024*10);
        private static readonly long[,] ab = new long[5001,5001];

        private static void Main(string[] args)
        {
            writer.WriteLine(Solve(args));
            writer.Flush();
        }

        private static long Solve(string[] args)
        {
            int a = Next();
            int b = Next();
            int c = Next();

            long ans = (CG(a, b)*CG(a, c))%mod;
            ans = (ans*CG(b, c))%mod;

            return ans;
        }

        private static long CG(int a, int b)
        {
            if (a > b)
            {
                int c = a;
                a = b;
                b = c;
            }

            if (a == 1)
                return b + 1;

            if (ab[a, b] != 0)
                return ab[a, b];

            return ab[a, b] = (CG(a - 1, b) + b*CG(a - 1, b - 1))%mod;
        }

        private static int Next()
        {
            int c;
            int res = 0;
            do
            {
                c = reader.Read();
                if (c == -1)
                    return res;
            } while (c < '0' || c > '9');
            res = c - '0';
            while (true)
            {
                c = reader.Read();
                if (c < '0' || c > '9')
                    return res;
                res *= 10;
                res += c - '0';
            }
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Threading;
using System.Runtime.CompilerServices;
using System.Text;
using System.Diagnostics;
using System.Numerics;
using static System.Console;
using static System.Convert;
using static System.Math;
using static Template;

class Solver
{
    public Scanner sc;
    public void Solve()
    {
        int N, K;
        sc.Make(out N, out K);
        var dp = Create(N + 1, () => new ModInt[N + 1]);
        var newdp = Create(N + 1, () => new ModInt[N + 1]);
        dp[1][1] = 2;
        for (int i = 1; i < N; i++)
        {
            for (int j = 1; j < N+1; j++)
            {
                for (int k = 1; k < j+1; k++)
                {
                    newdp[j][k] = dp[j][k - 1];
                    if (j == k) newdp[j][k] += dp[j - 1][k - 1];
                    newdp[j][1] += dp[j][k];
                }
            }
            swap(ref dp, ref newdp);
        }
        var ct = new ModInt[N + 1];
        for (int i = 0; i <= N; i++)
            for (int j = 0; j <= i; j++)
                ct[i] += dp[i][j];
        ModInt res = 0;
        for(int i = 1; i <= Min(K-1,N); i++)
        {
            var seg = new DualSegmentTree<ModInt>(N, 0, (a, b) => a + b);
            seg.Update(0, Min(N, (K - 1) / i), 1);
            for (int j = 0; j < N - 1; j++)
                seg.Update(j + 1, Min(j + 1 + (K - 1) / i,N), seg.Query(j));
            res += seg.Query(N - 1)*ct[i];
        }
        Console.WriteLine(res);
    }
}

public struct ModInt
{
    //public const long MOD = (int)1e9 + 7;
    public const long MOD = 998244353;
    public long Value { get; set; }
    public ModInt(long n = 0) { Value = n; }
    private static ModInt[] fac, inv, facinv;
    public override string ToString() => Value.ToString();
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static ModInt operator +(ModInt l, ModInt r)
    {
        l.Value += r.Value;
        if (l.Value >= MOD) l.Value -= MOD;
        return l;
    }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static ModInt operator -(ModInt l, ModInt r)
    {
        l.Value -= r.Value;
        if (l.Value < 0) l.Value += MOD;
        return l;
    }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static ModInt operator *(ModInt l, ModInt r) => new ModInt(l.Value * r.Value % MOD);
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static ModInt operator /(ModInt l, ModInt r) => l * Pow(r, MOD - 2);
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static implicit operator long(ModInt l) => l.Value;
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static implicit operator ModInt(long n)
    {
        n %= MOD; if (n < 0) n += MOD;
        return new ModInt(n);
    }

    public static ModInt Pow(ModInt m, long n)
    {
        if (n == 0) return 1;
        if (n % 2 == 0) return Pow(m * m, n >> 1);
        else return Pow(m * m, n >> 1) * m;
    }

    public static void Build(int n)
    {
        fac = new ModInt[n + 1];
        facinv = new ModInt[n + 1];
        inv = new ModInt[n + 1];
        inv[1] = fac[0] = fac[1] = facinv[0] = facinv[1] = 1;
        for (var i = 2; i <= n; i++)
        {
            fac[i] = fac[i - 1] * i;
            inv[i] = MOD - inv[MOD % i] * (MOD / i);
            facinv[i] = facinv[i - 1] * inv[i];
        }
    }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static ModInt Fac(int n) => fac[n];
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static ModInt Inv(int n) => inv[n];
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static ModInt FacInv(int n) => facinv[n];
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static ModInt Comb(int n, int r)
    {
        if (n < r) return 0;
        if (n == r) return 1;
        return fac[n] * facinv[r] * facinv[n - r];
    }
    public static ModInt Perm(int n, int r)
    {
        if (n < r) return 0;
        return fac[n] * facinv[n - r];
    }

}

public class DualSegmentTree<T>
{
    protected readonly T[] data;
    protected readonly int size;
    protected readonly Func<T, T, T> merge;
    protected readonly T idT;

    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    protected int Parent(int i)
        => (i - 1) >> 1;
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    protected int Left(int i)
        => (i << 1) + 1;
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    protected int Right(int i)
        => (i + 1) << 1;
    public T this[int i]
    {
        get { return data[i + size - 1]; }
        set { data[i + size - 1] = value; }
    }

    public DualSegmentTree(int N, T idT, Func<T, T, T> merge)
    {
        this.merge = merge;
        this.size = 1;
        this.idT = idT;
        while (size < N)
            size <<= 1;
        data = new T[2 * this.size - 1];
        for (var i = 0; i < 2 * size - 1; i++)
            data[i] = idT;
    }
    public void Update(int left, int right, T value, int k = 0, int l = 0, int r = -1)
    {
        if (r == -1) r = size;
        if (r <= left || right <= l) return;
        if (left <= l && r <= right) data[k] = merge(data[k], value);
        else
        {
            Update(left, right, value, Left(k), l, (l + r) >> 1);
            Update(left, right, value, Right(k), (l + r) >> 1, r);
        }
    }
    public T Query(int i)
    {
        i += size - 1;
        var value = merge(idT, data[i]);
        while (i > 0)
        {
            i = Parent(i);
            value = merge(value, data[i]);
        }
        return value;
    }

    public int Find(int st, Func<T, bool> check)
    {
        var x = idT;
        return Find(st, check, ref x, 0, 0, size);
    }
    private int Find(int st, Func<T, bool> check, ref T x, int k, int l, int r)
    {
        if (l + 1 == r)
        { x = merge(x, data[k]); return check(x) ? k - size + 1 : -1; }
        var m = (l + r) >> 1;
        if (m <= st) return Find(st, check, ref x, Right(k), m, r);
        if (st <= l && !check(merge(x, data[k])))
        { x = merge(x, data[k]); return -1; }
        var xl = Find(st, check, ref x, Left(k), l, m);
        if (xl >= 0) return xl;
        return Find(st, check, ref x, Right(k), m, r);
    }
}
#region Template
public static class Template
{
    static void Main(string[] args)
    {
        Console.SetOut(new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false });
        var sol = new Solver() { sc = new Scanner() };
        //var th = new Thread(sol.Solve, 1 << 26);th.Start();th.Join();
        sol.Solve();
        Console.Out.Flush();
    }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static bool chmin<T>(ref T a, T b) where T : IComparable<T> { if (a.CompareTo(b) > 0) { a = b; return true; } return false; }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static bool chmax<T>(ref T a, T b) where T : IComparable<T> { if (a.CompareTo(b) < 0) { a = b; return true; } return false; }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static void swap<T>(ref T a, ref T b) { var t = b; b = a; a = t; }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static void swap<T>(this IList<T> A, int i, int j) { var t = A[i]; A[i] = A[j]; A[j] = t; }
    public static T[] Create<T>(int n, Func<T> f) { var rt = new T[n]; for (var i = 0; i < rt.Length; ++i) rt[i] = f(); return rt; }
    public static T[] Create<T>(int n, Func<int, T> f) { var rt = new T[n]; for (var i = 0; i < rt.Length; ++i) rt[i] = f(i); return rt; }
    public static void Out<T>(this IList<T> A, out T a) => a = A[0];
    public static void Out<T>(this IList<T> A, out T a, out T b) { a = A[0]; b = A[1]; }
    public static void Out<T>(this IList<T> A, out T a, out T b, out T c) { A.Out(out a, out b); c = A[2]; }
    public static void Out<T>(this IList<T> A, out T a, out T b, out T c, out T d) { A.Out(out a, out b, out c); d = A[3]; }
    public static string Concat<T>(this IEnumerable<T> A, string sp) => string.Join(sp, A);
    public static char ToChar(this int s, char begin = '0') => (char)(s + begin);
    public static IEnumerable<T> Shuffle<T>(this IEnumerable<T> A) => A.OrderBy(v => Guid.NewGuid());
    public static int CompareTo<T>(this T[] A, T[] B, Comparison<T> cmp = null) { cmp = cmp ?? Comparer<T>.Default.Compare; for (var i = 0; i < Min(A.Length, B.Length); i++) { int c = cmp(A[i], B[i]); if (c > 0) return 1; else if (c < 0) return -1; } if (A.Length == B.Length) return 0; if (A.Length > B.Length) return 1; else return -1; }
    public static int ArgMax<T>(this IList<T> A, Comparison<T> cmp = null) { cmp = cmp ?? Comparer<T>.Default.Compare; T max = A[0]; int rt = 0; for (int i = 1; i < A.Count; i++) if (cmp(max, A[i]) < 0) { max = A[i]; rt = i; } return rt; }
    public static T PopBack<T>(this List<T> A) { var v = A[A.Count - 1]; A.RemoveAt(A.Count - 1); return v; }
    public static void Fail<T>(T s) { Console.WriteLine(s); Console.Out.Close(); Environment.Exit(0); }
}
public class Scanner
{
    public string Str => Console.ReadLine().Trim();
    public int Int => int.Parse(Str);
    public long Long => long.Parse(Str);
    public double Double => double.Parse(Str);
    public int[] ArrInt => Str.Split(' ').Select(int.Parse).ToArray();
    public long[] ArrLong => Str.Split(' ').Select(long.Parse).ToArray();
    public char[][] Grid(int n) => Create(n, () => Str.ToCharArray());
    public int[] ArrInt1D(int n) => Create(n, () => Int);
    public long[] ArrLong1D(int n) => Create(n, () => Long);
    public int[][] ArrInt2D(int n) => Create(n, () => ArrInt);
    public long[][] ArrLong2D(int n) => Create(n, () => ArrLong);
    private Queue<string> q = new Queue<string>();
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public T Next<T>() { if (q.Count == 0) foreach (var item in Str.Split(' ')) q.Enqueue(item); return (T)Convert.ChangeType(q.Dequeue(), typeof(T)); }
    public void Make<T1>(out T1 v1) => v1 = Next<T1>();
    public void Make<T1, T2>(out T1 v1, out T2 v2) { v1 = Next<T1>(); v2 = Next<T2>(); }
    public void Make<T1, T2, T3>(out T1 v1, out T2 v2, out T3 v3) { Make(out v1, out v2); v3 = Next<T3>(); }
    public void Make<T1, T2, T3, T4>(out T1 v1, out T2 v2, out T3 v3, out T4 v4) { Make(out v1, out v2, out v3); v4 = Next<T4>(); }
    public void Make<T1, T2, T3, T4, T5>(out T1 v1, out T2 v2, out T3 v3, out T4 v4, out T5 v5) { Make(out v1, out v2, out v3, out v4); v5 = Next<T5>(); }
    public void Make<T1, T2, T3, T4, T5, T6>(out T1 v1, out T2 v2, out T3 v3, out T4 v4, out T5 v5, out T6 v6) { Make(out v1, out v2, out v3, out v4, out v5); v6 = Next<T6>(); }
    public void Make<T1, T2, T3, T4, T5, T6, T7>(out T1 v1, out T2 v2, out T3 v3, out T4 v4, out T5 v5, out T6 v6, out T7 v7) { Make(out v1, out v2, out v3, out v4, out v5, out v6); v7 = Next<T7>(); }
    public (T1, T2) Make<T1, T2>() { Make(out T1 v1, out T2 v2); return (v1, v2); }
    public (T1, T2, T3) Make<T1, T2, T3>() { Make(out T1 v1, out T2 v2, out T3 v3); return (v1, v2, v3); }
    public (T1, T2, T3, T4) Make<T1, T2, T3, T4>() { Make(out T1 v1, out T2 v2, out T3 v3, out T4 v4); return (v1, v2, v3, v4); }
}

#endregion


using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;

// (づ°ω°)づﾐe★゜・。。・゜゜・。。・゜☆゜・。。・゜゜・。。・゜
public class Solver
{
    public void Solve()
    {
        int n = ReadInt();
        int[] arr = ReadToken().Split(new[] { 'W' }, StringSplitOptions.RemoveEmptyEntries).Select(s => s.Length).ToArray();
        Write(arr.Length);
        WriteArray(arr);

    }

    #region Main

    protected static TextReader reader;
    protected static TextWriter writer;
    static void Main()
    {
#if DEBUG
        reader = new StreamReader("..\\..\\input.txt");
        //reader = new StreamReader(Console.OpenStandardInput());
        writer = Console.Out;
        //writer = new StreamWriter("..\\..\\output.txt");
#else
        reader = new StreamReader(Console.OpenStandardInput());
        writer = new StreamWriter(Console.OpenStandardOutput());
        //reader = new StreamReader("input.txt");
        //writer = new StreamWriter("output.txt");
#endif
        try
        {
            new Solver().Solve();
            //var thread = new Thread(new Solver().Solve, 1024 * 1024 * 128);
            //thread.Start();
            //thread.Join();
        }
        catch (Exception ex)
        {
#if DEBUG
            Console.WriteLine(ex);
#else
            throw;
#endif
        }
        reader.Close();
        writer.Close();
    }

    #endregion

    #region Read / Write
    private static Queue<string> currentLineTokens = new Queue<string>();
    private static string[] ReadAndSplitLine() { return reader.ReadLine().Split(new[] { ' ', '\t', }, StringSplitOptions.RemoveEmptyEntries); }
    public static string ReadToken() { while (currentLineTokens.Count == 0)currentLineTokens = new Queue<string>(ReadAndSplitLine()); return currentLineTokens.Dequeue(); }
    public static int ReadInt() { return int.Parse(ReadToken()); }
    public static long ReadLong() { return long.Parse(ReadToken()); }
    public static double ReadDouble() { return double.Parse(ReadToken(), CultureInfo.InvariantCulture); }
    public static int[] ReadIntArray() { return ReadAndSplitLine().Select(int.Parse).ToArray(); }
    public static long[] ReadLongArray() { return ReadAndSplitLine().Select(long.Parse).ToArray(); }
    public static double[] ReadDoubleArray() { return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); }
    public static int[][] ReadIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++)matrix[i] = ReadIntArray(); return matrix; }
    public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)
    {
        int[][] matrix = ReadIntMatrix(numberOfRows); int[][] ret = new int[matrix[0].Length][];
        for (int i = 0; i < ret.Length; i++) { ret[i] = new int[numberOfRows]; for (int j = 0; j < numberOfRows; j++)ret[i][j] = matrix[j][i]; } return ret;
    }
    public static string[] ReadLines(int quantity) { string[] lines = new string[quantity]; for (int i = 0; i < quantity; i++)lines[i] = reader.ReadLine().Trim(); return lines; }
    public static void WriteArray<T>(IEnumerable<T> array) { writer.WriteLine(string.Join(" ", array)); }
    public static void Write(params object[] array) { WriteArray(array); }
    public static void WriteLines<T>(IEnumerable<T> array) { foreach (var a in array)writer.WriteLine(a); }
    private class SDictionary<TKey, TValue> : Dictionary<TKey, TValue>
    {
        public new TValue this[TKey key]
        {
            get { return ContainsKey(key) ? base[key] : default(TValue); }
            set { base[key] = value; }
        }
    }
    private static T[] Init<T>(int size) where T : new() { var ret = new T[size]; for (int i = 0; i < size; i++)ret[i] = new T(); return ret; }
    #endregion
}


namespace ContestRuns
{
    using System;
    using System.Collections.Generic;
    using System.Collections.Specialized;
    using System.IO;
    using System.Linq;
    using System.Globalization;
    using System.Threading;
    using System.Text;

    class Program
    {

#if DEBUG
        static readonly TextReader input = File.OpenText(@"../../A/A.in");
        static readonly TextWriter output = File.CreateText(@"../../A/A.out");
#else
        static readonly TextReader input = Console.In;
        static readonly TextWriter output = Console.Out;
#endif

        static long dist(long difX, long difY)
        {
            difX = Math.Abs(difX);
            difY = Math.Abs(difY);
            //int shared = Math.Min(difX, difY);
            //int other = Math.Max(difX, difY) - shared;
            return Math.Max(difX, difY);
        }

        private static void SolveA()
        {
            long n = long.Parse(input.ReadLine());
            long[] nm = input.ReadLine().Split(' ').Select(long.Parse).ToArray();
            long x = nm[0], y = nm[1];

            long d1 = dist(x - 1, y - 1);
            long d2 = dist(x - n, y - n);

            if(d1 <= d2)
            {
                output.WriteLine("White");
                return;
            }

            output.WriteLine("Black");
        }

        static void Main(string[] args)
        {
            Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
            SolveA();
            output.Flush();
        }
    }
}


#if DEBUG
using System.Reflection;
using System.Threading.Tasks;
#endif

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Numerics;
using System.Globalization;

namespace _245b
{
    class Program
    {
        static string _inputFilename = "input.txt";
        static string _outputFilename = "output.txt";
        static bool _useFileInput = false;

        static void Main(string[] args)
        {
            StreamWriter file = null;
#if DEBUG
			Console.SetIn(getInput());
#else
            if (_useFileInput)
            {
                Console.SetIn(File.OpenText(_inputFilename));
                file = new StreamWriter(_outputFilename);
                Console.SetOut(file);
            }
#endif

            try
            {
                solution();
            }
            finally
            {
                if (_useFileInput)
                {
                    file.Close();
                }
            }
        }

        static void solution()
        {
            #region SOLUTION
            var d = readIntArray();
            var n = d[0];
            var k = d[1];
            var x = d[2];
            var c = readIntArray();
            var res = 0;
            for (int i = 0; i < n + 1; i++)
            {
                var li = -1;
                var ri = -1;
                var left = 0;
                var right = 0;
                var gl = true;
                var gr = true;
                var lc = -1;
                var rc = -1;

                if (i == 0 && c[i] == x)
                {
                    gl = false;
                    gr = true;
                    right = 1;
                    left = 0;
                    li = -1;
                    lc = -1;
                    rc = x;
                    ri = i;
                }
                else if (i == n && c[n - 1] == x)
                {
                    gl = true;
                    gr = false;
                    right = 0;
                    left = 1;
                    li = n - 1;
                    lc = x;
                    rc = -1;
                    ri = n;
                }
                else if (i > 0 && c[i - 1] == x)
                {
                    right = 0;
                    left = 1;
                    li = i - 1;
                    lc = x;
                    rc = c[i];
                    ri = i;
                    gr = true;
                    gl = true;
                }
                else
                {
                    continue;
                }

                var ls = 0;
                while (true)
                {
                    if (!gl && !gr)
                    {
                        break;
                    }

                    if (gl)
                    {
                        for (; li >= 0; li--)
                        {
                            var next = c[li];
                            if (next != lc)
                            {
                                break;
                            }

                            left++;
                        }
                    }

                    if (gr)
                    {
                        for (; ri < n; ri++)
                        {
                            var next = c[ri];
                            if (next != rc)
                            {
                                break;
                            }

                            right++;
                        }
                    }

                    if (lc == rc)
                    {
                        var sum = right + left;
                        if (sum >= 3)
                        {
                            ls += sum;
                            left = 0;
                            right = 0;
                            if (li >= 0)
                            {
                                lc = c[li];
                                gl = true;
                            }
                            else
                            {
                                gl = false;
                                lc = -1;
                            }

                            if (ri <= n - 1)
                            {
                                rc = c[ri];
                                gr = true;
                            }
                            else
                            {
                                gr = false;
                                rc = -1;
                            }
                        }
                        else
                        {
                            break;
                        }
                    }
                    else
                    {
                        if (left >= 3)
                        {
                            ls += left;
                            if (li >= 0)
                            {
                                lc = c[li];
                                gl = true;
                            }
                            else
                            {
                                gl = false;
                                lc = -1;
                            }

                            left = 0;
                        }
                        else
                        {
                            gl = false;
                        }

                        if (right >= 3)
                        {
                            ls += right;
                            if (ri <= n - 1)
                            {
                                rc = c[ri];
                                gr = true;
                            }
                            else
                            {
                                gr = false;
                                rc = -1;
                            }

                            right = 0;
                        }
                        else
                        {
                            gr = false;
                        }
                    }
                }

                if (ls > res)
                {
                    res = ls;
                }
            }

            Console.WriteLine(Math.Max(res - 1, 0));

            //var n = readInt();
            //var m = readInt();

            //var a = readIntArray();
            //var b = readIntArray();
            #endregion
        }

        static int readInt()
        {
            return int.Parse(Console.ReadLine());
        }

        static long readLong()
        {
            return long.Parse(Console.ReadLine());
        }

        static int[] readIntArray()
        {
            return Console.ReadLine().Split(' ').Where(i => !string.IsNullOrEmpty(i)).Select(i => int.Parse(i)).ToArray();
        }

        static long[] readLongArray()
        {
            return Console.ReadLine().Split(' ').Where(i => !string.IsNullOrEmpty(i)).Select(i => long.Parse(i)).ToArray();
        }

#if DEBUG
		static StreamReader getInput()
		{
			var resName = Assembly.GetCallingAssembly().GetManifestResourceNames()[0];
			var resource = Assembly.GetCallingAssembly().GetManifestResourceStream(resName);

			return new StreamReader(resource);
		}
#endif
    }
}


using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;

class Solver
{
	class Node
	{
		public char[,] board = new char[8, 8];

		public Node()
		{
		}

		public int mx;
		public int my;
		public int s;

		public Node Move(int x, int y)
		{
			if (x < 0 || x >= 8 || y < 0 || y >= 8)
				return null;	//	盤外

			if (board[x, y] == 'S')
				return null;	//	Sあり

			var next = new Node();
			next.board = new char[8,8];
			for (int xx = 0; xx < 8; xx++)
			{
				for (int yy = 6; yy >= 0; yy--)
				{
					if (this.board[xx, yy] == 'S')
					{
						//	落下

						if (xx == x && yy + 1 == y)
							return null;	//	接触

						next.board[xx, yy + 1] = 'S';
						next.s++;
					}
				}
			}
			next.mx = x;
			next.my = y;

			return next;
		}
	}

	public void Solve()
	{
		var list = new List<Node>();
		var s = new Node();
		for (int y = 0; y < 8; y++)
		{
			var ss = CF.ReadLine();
			for (int x = 0; x < 8; x++)
			{
				s.board[x, y] = ss[x];
				if (ss[x] == 'S')
					s.s++;
			}
		}
		s.my = 7;
		s.mx = 0;
		list.Add(s);

		for (; ; )
		{
			if (list.Count == 0)
			{
				CF.WriteLine("LOSE");
				return;
			}

			var list2 = new List<Node>();

			foreach(var n in list)
			{
				for (int dx = -1; dx <= 1; dx++)
				{
					for (int dy = -1; dy <= 1; dy++)
					{
						var next = n.Move(n.mx + dx, n.my + dy);
						if (next == null)
							continue;	//	移動不可

						if (
							next.s == 0 ||
							(next.mx==7&&next.my==0))
						{
							CF.WriteLine("WIN");
							return;
						}

						list2.Add(next);
					}
				}
			}

			list = list2;
		}
    }

	//  test
	static Utils CF = new Utils(new[]{
@"
.......A
........
........
........
........
........
........
M.......
",
 @"
.......A
........
........
........
........
........
SS......
M.......
",
 @"
.......A
........
........
........
........
.S......
S.......
MS......
"

    });
    #region test

    static void Main(string[] args)
    {
#if DEBUG
        for (int t=0;t<CF.TestCount;t++ )
        {
            CF.Test(t);
            new Solver().Solve();
        }
#else
        new Solver().Solve();
#endif
    }

    class Utils
    {
        public void Test(int t)
        {
            _lines = new List<string>();
            string[] ss = _test_input[t].Replace("\n", "").Split('\r');
            for (int i = 0; i < ss.Length; i++)
            {
                if (
                    (i == 0 || i == ss.Length - 1) &&
                    ss[i].Length == 0
                    )
                    continue;

                _lines.Add(ss[i]);
            }
        }

        public int TestCount
        {
            get
            {
                return _test_input.Length;
            }
        }

        public string ReadLine()
        {
#if DEBUG
            string s = null;
            if (_lines.Count > 0)
            {
                s = _lines[0];
                _lines.RemoveAt(0);
            }
            return s;

#else
            //return _sr.ReadLine();
        return Console.In.ReadLine();
#endif
        }

        public void WriteLine(object o)
        {
#if DEBUG
            System.Diagnostics.Trace.WriteLine(o);
#else
            //_sw.WriteLine(o);
        Console.WriteLine(o);
#endif
        }

        public void Write(object o)
        {
#if DEBUG
            System.Diagnostics.Trace.Write(o);
#else
                //_sw.Write(o);
        Console.Write(o);
#endif
        }

        string[] _test_input;

        List<string> _lines;

#if DEBUG
        public Utils(string[] test_input)
        {
            _test_input = test_input;
        }
#else

        public Utils(string[] dummy)
        {
            //_sr = new System.IO.StreamReader("input.txt");
            //_sw = new System.IO.StreamWriter("output.txt");
        }
#endif

    }

    #endregion
}


using System;
using System.Text;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
class Problem
{
    static void Main()
    {
        //--------------------------------input--------------------------------//

        var str = Array.ConvertAll( Console.ReadLine().Split(), Convert.ToInt32 );
        int n = str[0], h = str[1], m = str[2];
        var l = new int[m];
        var r = new int[m];
        var x = new int[m];
        for(int i = 0 ; i < m ; i++)
        {
            str = Array.ConvertAll( Console.ReadLine().Split(), Convert.ToInt32 );
            l[i] = str[0];
            r[i] = str[1];
            x[i] = str[2];
        }

        //--------------------------------solve--------------------------------//

        var houses = new int[n];
        for(int i = 0 ; i < n ; i++)
            houses[i] = h;
        for(int i = 0 ; i < m ; i++)
            for(int j = l[i]-1 ; j <= r[i]-1 ; j++)
                houses[j] = Math.Min(x[i],houses[j]);
        var kq = houses.Select( t => t * t ).ToList();
        Console.WriteLine( kq.Sum() );
    }
}


using System;

namespace Codeforses
{
    class Program
    {
        static void Main(string[] args)
        {
            string _numberToCheck = Console.ReadLine();

            int result;
            Int32.TryParse(_numberToCheck, out result);

            bool isWork = true;
            do
            {
                string localResult = result.ToString();
                char[] symbols = localResult.ToCharArray();

                int sum = 0;
                foreach(var ch in symbols)
                {
                    sum += Int32.Parse(ch.ToString());
                }

                if(sum % 4 == 0)
                {
                    isWork = false;
                    Console.WriteLine(result);
                }
                else
                {
                    result++;
                }
            }
            while (isWork);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Threading;
using System.Text;
using System.Text.RegularExpressions;
using System.Diagnostics;
using static util;
using P = pair<int, int>;

class Program {
    static void Main(string[] args) {
        var sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
        var solver = new Solver(sw);
        // var t = new Thread(solver.solve, 1 << 26); // 64 MB
        // t.Start();
        // t.Join();
        solver.solve();
        sw.Flush();
    }
}

class Solver {
    StreamWriter sw;
    Scan sc;
    void Prt(string a) => sw.WriteLine(a);
    void Prt<T>(IEnumerable<T> a) => Prt(string.Join(" ", a));
    void Prt(params object[] a) => Prt(string.Join(" ", a));
    public Solver(StreamWriter sw) {
        this.sw = sw;
        this.sc = new Scan();
    }

    public void solve() {
        int n, k;
        sc.Multi(out n, out k);
        long ans = 0;
        MyMath.setfacts(n + 1);
        for (int i = 1; i <= n; i++)
        {
            int c = n / i;
            if (c >= k) {
                ans += MyMath.comb(c - 1, k - 1);
            }
            else break;
        }
        Prt(ans % M);
    }
}

class pair<T, U> : IComparable<pair<T, U>> {
    public T v1;
    public U v2;
    public pair() : this(default(T), default(U)) {}
    public pair(T v1, U v2) { this.v1 = v1; this.v2 = v2; }
    public int CompareTo(pair<T, U> a) {
        int c = Comparer<T>.Default.Compare(v1, a.v1);
        return c != 0 ? c : Comparer<U>.Default.Compare(v2, a.v2);
    }
    public override string ToString() => v1 + " " + v2;
    public void Deconstruct(out T a, out U b) { a = v1; b = v2; }
}
static class util {
    // public static readonly int M = 1000000007;
    public static readonly int M = 998244353;
    public static readonly long LM = 1L << 60;
    public static readonly double eps = 1e-11;
    public static void DBG(string a) => Console.Error.WriteLine(a);
    public static void DBG<T>(IEnumerable<T> a) => DBG(string.Join(" ", a));
    public static void DBG(params object[] a) => DBG(string.Join(" ", a));
    public static void Assert(params bool[] conds) {
        if (conds.Any(x => !x)) throw new Exception();
    }
    public static pair<T, U> make_pair<T, U>(T v1, U v2) => new pair<T, U>(v1, v2);
    public static int CompareList<T>(IList<T> a, IList<T> b) where T : IComparable<T> {
        for (int i = 0; i < a.Count && i < b.Count; i++)
            if (a[i].CompareTo(b[i]) != 0) return a[i].CompareTo(b[i]);
        return a.Count.CompareTo(b.Count);
    }
    public static bool inside(int i, int j, int h, int w) => i >= 0 && i < h && j >= 0 && j < w;
    static readonly int[] dd = { 0, 1, 0, -1 };
    // static readonly string dstring = "RDLU";
    public static P[] adjacents(int i, int j)
        => Enumerable.Range(0, dd.Length).Select(k => new P(i + dd[k], j + dd[k ^ 1])).ToArray();
    public static P[] adjacents(int i, int j, int h, int w)
        => Enumerable.Range(0, dd.Length).Select(k => new P(i + dd[k], j + dd[k ^ 1]))
                                         .Where(p => inside(p.v1, p.v2, h, w)).ToArray();
    public static P[] adjacents(this P p) => adjacents(p.v1, p.v2);
    public static P[] adjacents(this P p, int h, int w) => adjacents(p.v1, p.v2, h, w);
    public static Dictionary<T, int> compress<T>(this IEnumerable<T> a)
        => a.Distinct().OrderBy(v => v).Select((v, i) => new { v, i }).ToDictionary(p => p.v, p => p.i);
    public static Dictionary<T, int> compress<T>(params IEnumerable<T>[] a) => compress(a.Aggregate(Enumerable.Union));
    public static T[] inv<T>(this Dictionary<T, int> dic) {
        var res = new T[dic.Count];
        foreach (var item in dic) res[item.Value] = item.Key;
        return res;
    }
    public static void swap<T>(ref T a, ref T b) where T : struct { var t = a; a = b; b = t; }
    public static void swap<T>(this IList<T> a, int i, int j) where T : struct { var t = a[i]; a[i] = a[j]; a[j] = t; }
    public static T[] copy<T>(this IList<T> a) {
        var ret = new T[a.Count];
        for (int i = 0; i < a.Count; i++) ret[i] = a[i];
        return ret;
    }
    public static void Deconstruct<T>(this IList<T> v, out T a) {
        a = v[0];
    }
    public static void Deconstruct<T>(this IList<T> v, out T a, out T b) {
        a = v[0]; b = v[1];
    }
    public static void Deconstruct<T>(this IList<T> v, out T a, out T b, out T c) {
        a = v[0]; b = v[1]; c = v[2];
    }
    public static void Deconstruct<T>(this IList<T> v, out T a, out T b, out T c, out T d) {
        a = v[0]; b = v[1]; c = v[2]; d = v[3];
    }
    public static void Deconstruct<T>(this IList<T> v, out T a, out T b, out T c, out T d, out T e) {
        a = v[0]; b = v[1]; c = v[2]; d = v[3]; e = v[4];
    }
}

class Scan {
    StreamReader sr;
    public Scan() { sr = new StreamReader(Console.OpenStandardInput()); }
    public Scan(string path) { sr = new StreamReader(path); }
    public int Int => int.Parse(Str);
    public long Long => long.Parse(Str);
    public double Double => double.Parse(Str);
    public string Str => sr.ReadLine().Trim();
    public pair<T, U> Pair<T, U>() {
        T a; U b;
        Multi(out a, out b);
        return new pair<T, U>(a, b);
    }
    public P P => Pair<int, int>();
    public int[] IntArr => StrArr.Select(int.Parse).ToArray();
    public long[] LongArr => StrArr.Select(long.Parse).ToArray();
    public double[] DoubleArr => StrArr.Select(double.Parse).ToArray();
    public string[] StrArr => Str.Split(new[]{' '}, StringSplitOptions.RemoveEmptyEntries);
    bool eq<T, U>() => typeof(T).Equals(typeof(U));
    T ct<T, U>(U a) => (T)Convert.ChangeType(a, typeof(T));
    T cv<T>(string s) => eq<T, int>()    ? ct<T, int>(int.Parse(s))
                       : eq<T, long>()   ? ct<T, long>(long.Parse(s))
                       : eq<T, double>() ? ct<T, double>(double.Parse(s))
                       : eq<T, char>()   ? ct<T, char>(s[0])
                                         : ct<T, string>(s);
    public void Multi<T>(out T a) => a = cv<T>(Str);
    public void Multi<T, U>(out T a, out U b) {
        var ar = StrArr; a = cv<T>(ar[0]); b = cv<U>(ar[1]);
    }
    public void Multi<T, U, V>(out T a, out U b, out V c) {
        var ar = StrArr; a = cv<T>(ar[0]); b = cv<U>(ar[1]); c = cv<V>(ar[2]);
    }
    public void Multi<T, U, V, W>(out T a, out U b, out V c, out W d) {
        var ar = StrArr; a = cv<T>(ar[0]); b = cv<U>(ar[1]); c = cv<V>(ar[2]); d = cv<W>(ar[3]);
    }
    public void Multi<T, U, V, W, X>(out T a, out U b, out V c, out W d, out X e) {
        var ar = StrArr; a = cv<T>(ar[0]); b = cv<U>(ar[1]); c = cv<V>(ar[2]); d = cv<W>(ar[3]); e = cv<X>(ar[4]);
    }
}

static class MyMath {
    public static long Mod = util.M;
    // public static long Mod = 1000000007;
    public static bool isprime(long a) {
        if (a < 2) return false;
        for (long i = 2; i * i <= a; i++) if (a % i == 0) return false;
        return true;
    }
    public static bool[] sieve(int n) {
        var p = new bool[n + 1];
        for (int i = 2; i <= n; i++) p[i] = true;
        for (int i = 2; i * i <= n; i++) if (p[i]) for (int j = i * i; j <= n; j += i) p[j] = false;
        return p;
    }
    public static int[] sieve2(int n) {
        var p = new int[n + 1];
        for (int i = 2; i <= n; i++) p[i] = i;
        for (int i = 2; i * i <= n; i++) {
            if (p[i] == i)
                for (int j = i * i; j <= n; j += i)
                    p[j] = Math.Min(p[j], i);
        }
        return p;
    }
    public static bool[] segmentSieve(long l, long r) {
        int sqn = (int)Math.Sqrt(r + 9);
        var ps = getprimes(sqn);
        return segmentSieve(l, r,ps);
    }
    public static bool[] segmentSieve(long l, long r, List<int> ps) {
        var sieve = new bool[r - l + 1];
        for (long i = l; i <= r; i++) sieve[i - l] = true;
        foreach (long p in ps) {
            if (p * p > r) break;
            for (long i = p >= l ? p * p : (l + p - 1) / p * p; i <= r; i += p) sieve[i - l] = false;
        }
        return sieve;
    }
    public static List<int> getprimes(int n) {
        var prs = new List<int>();
        var p = sieve(n);
        for (int i = 2; i <= n; i++) if (p[i]) prs.Add(i);
        return prs;
    }
    public static long pow(long a, long b, long mod) {
        a %= mod;
        if (b < 0) Console.Error.WriteLine($"power number is negative ({a}^{b}).");
        if (b <= 0) return 1;
        var t = pow(a, b / 2, mod);
        if ((b & 1) == 0) return t * t % mod;
        return t * t % mod * a % mod;
    }
    public static long pow(long a, long b) => pow(a, b, Mod);
    public static long inv(long a) => pow(a, Mod - 2);
    public static long gcd(long a, long b) {
        while (b > 0) {
            var t = a % b;
            a = b;
            b = t;
        }
        return a;
    }
    // a x + b y = gcd(a, b)
    public static long extgcd(long a, long b, out long x, out long y) {
        long g = a; x = 1; y = 0;
        if (b > 0) { g = extgcd(b, a % b, out y, out x); y -= a / b * x; }
        return g;
    }

    // return (r, m): x = r (mod. m)
    // return (0, -1) if no answer
    public static pair<long, long> chineserem(IList<long> b, IList<long> m) {
        long r = 0, M = 1;
        for (int i = 0; i < b.Count; ++i) {
            long p, q;
            long d = extgcd(M, m[i], out p, out q); // p is inv of M/d (mod. m[i]/d)
            if ((b[i] - r) % d != 0) return new pair<long, long>(0, -1);
            long tmp = (b[i] - r) / d * p % (m[i]/d);
            r += M * tmp;
            M *= m[i]/d;
        }
        return new pair<long, long>((r % M + M) % M, M);
    }

    // return k: x^k = y (mod. mod) O(sqrt(mod))
    public static long modlog(long x, long y, long mod) {
        if (y == 1) return 0;
        long H = (long)Math.Sqrt(mod) + 1;
        var baby = new Dictionary<long, long>();
        for (long b = 0, xby = y; b < H; b++, xby = (xby * x) % mod) {
            if (!baby.ContainsKey(xby))
                baby.Add(xby, b);
            else
                baby[xby] = b;
        }

        long xH = 1;
        for (int i = 0; i < H; ++i) xH = xH * x % mod;
        for (long a = 1, xaH = xH; a <= H; a++, xaH = (xaH * xH) % mod)
            if (baby.ContainsKey(xaH))
                return a * H - baby[xaH];

        return -1;
    }
    public static long lcm(long a, long b) => a / gcd(a, b) * b;

    static long[] facts, invs;
    public static void setfacts(int n) {
        facts = new long[n + 1];
        facts[0] = 1;
        for (int i = 1; i <= n; i++) facts[i] = facts[i - 1] * i % Mod;
        invs = new long[n + 1];
        invs[n] = inv(facts[n]);
        for (int i = n; i > 0 ; i--) invs[i - 1] = invs[i] * i % Mod;
    }
    public static long fact(long n) {
        if (n < 0) return 0;
        if (facts != null && facts.Length > n) return facts[n];
        long numer = 1;
        for (long i = 1; i <= n; i++) numer = numer * (i % Mod) % Mod;
        return numer;
    }
    public static long perm(long n, long r) {
        if (n < 0 || r < 0 || r > n) return 0;
        if (facts != null && facts.Length > n) return facts[n] * invs[n - r] % Mod;
        long numer = 1;
        for (long i = 0; i < r; i++) numer = numer * ((n - i) % Mod) % Mod;
        return numer;
    }
    public static long comb(long n, long r) {
        if (n < 0 || r < 0 || r > n) return 0;
        if (facts != null && facts.Length > n) return facts[n] * invs[r] % Mod * invs[n - r] % Mod;
        if (n - r < r) r = n - r;
        long numer = 1, denom = 1;
        for (long i = 0; i < r; i++) {
            numer = numer * ((n - i) % Mod) % Mod;
            denom = denom * ((i + 1) % Mod) % Mod;
        }
        return numer * inv(denom) % Mod;
    }
    public static long multi_choose(long n, long r) => comb(n + r - 1, r);
    public static long[][] getcombs(int n) {
        var ret = new long[n + 1][];
        for (int i = 0; i <= n; i++) {
            ret[i] = new long[i + 1];
            ret[i][0] = ret[i][i] = 1;
            for (int j = 1; j < i; j++) ret[i][j] = (ret[i - 1][j - 1] + ret[i - 1][j]) % Mod;
        }
        return ret;
    }
    // nC0, nC2, ..., nCn
    public static long[] getcomb(int n) {
        var ret = new long[n + 1];
        ret[0] = 1;
        for (int i = 0; i < n; i++) ret[i + 1] = ret[i] * (n - i) % Mod * inv(i + 1) % Mod;
        return ret;
    }

    public static class ModMatrix {
        public static long[][] E(int n) {
            var ret = new long[n][];
            for (int i = 0; i < n; i++) { ret[i] = new long[n]; ret[i][i] = 1; }
            return ret;
        }
        public static long[][] pow(long[][] A, long n) {
            if (n == 0) return E(A.Length);
            var t = pow(A, n / 2);
            if ((n & 1) == 0) return mul(t, t);
            return mul(mul(t, t), A);
        }
        public static long dot(long[] x, long[] y) {
            int n = x.Length;
            long ret = 0;
            for (int i = 0; i < n; i++) ret = (ret + x[i] * y[i]) % Mod;
            return ret;
        }
        public static long[][] trans(long[][] A) {
            int n = A[0].Length, m = A.Length;
            var ret = new long[n][];
            for (int i = 0; i < n; i++) { ret[i] = new long[m]; for (int j = 0; j < m; j++) ret[i][j] = A[j][i]; }
            return ret;
        }
        public static long[] mul(long a, long[] x) {
            int n = x.Length;
            var ret = new long[n];
            for (int i = 0; i < n; i++) ret[i] = a * x[i] % Mod;
            return ret;
        }
        public static long[] mul(long[][] A, long[] x) {
            int n = A.Length;
            var ret = new long[n];
            for (int i = 0; i < n; i++) ret[i] = dot(x, A[i]);
            return ret;
        }
        public static long[][] mul(long a, long[][] A) {
            int n = A.Length;
            var ret = new long[n][];
            for (int i = 0; i < n; i++) ret[i] = mul(a, A[i]);
            return ret;
        }
        public static long[][] mul(long[][] A, long[][] B) {
            int n = A.Length;
            var Bt = trans(B);
            var ret = new long[n][];
            for (int i = 0; i < n; i++) ret[i] = mul(Bt, A[i]);
            return ret;
        }
    }
}


using System;

namespace CSharp
{
    public class _979A
    {
        public static void Main()
        {
            long n = long.Parse(Console.ReadLine()) + 1;
            Console.WriteLine(n % 2 == 0 ? n / 2 : n == 1 ? 0 : n);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CFTraining.D_s
{
    class Polyline340
    {
        public static void Main(string[] args)
        {
            Console.WriteLine(Solve());
        }

        public static int Solve()
        {
            List<Point> p = new List<Point>();
            for (int i = 0; i < 3; i++)
            {
                string[] line = Console.ReadLine().Split(' ');
                p.Add(new Point { x = Convert.ToInt32(line[0]), y = Convert.ToInt32(line[1]) });
            }

            if (p[0].LieInSameLine(p[1]) != 0 && p[0].LieInSameLine(p[1]) == p[0].LieInSameLine(p[2])) return 1;
            int s1 = p[0].LieInSameLine(p[1]), s2 = p[0].LieInSameLine(p[2]), s3 = p[1].LieInSameLine(p[2]);
            if (s1 > 0)
            {
                if (s1 == 1)
                {
                    int min = Math.Min(p[0].y, p[1].y);
                    int max = Math.Max(p[0].y, p[1].y);
                    if (p[2].y <= min || p[2].y >= max)
                    {
                        return 2;
                    }
                }
                if (s1 == 2)
                {
                    int min = Math.Min(p[0].x, p[1].x);
                    int max = Math.Max(p[0].x, p[1].x);
                    if (p[2].x <= min || p[2].x >= max)
                    {
                        return 2;
                    }
                }
            }
            else if (s2 > 0)
            {
                if (s2 == 1)
                {
                    int min = Math.Min(p[0].y, p[2].y);
                    int max = Math.Max(p[0].y, p[2].y);
                    if (p[1].y <= min || p[1].y >= max)
                    {
                        return 2;
                    }
                }
                if (s2 == 2)
                {
                    int min = Math.Min(p[0].x, p[2].x);
                    int max = Math.Max(p[0].x, p[2].x);
                    if (p[1].x <= min || p[1].x >= max)
                    {
                        return 2;
                    }
                }
            }
            else if (s3 > 0)
            {
                if (s3 == 1)
                {
                    int min = Math.Min(p[1].y, p[2].y);
                    int max = Math.Max(p[1].y, p[2].y);
                    if (p[0].y <= min || p[0].y >= max)
                    {
                        return 2;
                    }
                }
                if (s3 == 2)
                {
                    int min = Math.Min(p[1].x, p[2].x);
                    int max = Math.Max(p[1].x, p[2].x);
                    if (p[0].x <= min || p[0].x >= max)
                    {
                        return 2;
                    }
                }
            }
            return 3;
        }
    }

    class Point
    {
        public int x, y;
        public int LieInSameLine(Point p)
        {
            if (x == p.x) return 1;
            else if (y == p.y) return 2;
            else return 0;
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;

namespace Two_gram
{
    class Program
    {
        static void Main(string[] args)
        {
            int size = int.Parse(Console.ReadLine());
            string letter = Console.ReadLine();
            Dictionary<string, int> dict = new Dictionary<string, int>();
            string temp;

            for (int i = 1; i < letter.Length; i++)
            {
                temp = letter[i - 1].ToString() + letter[i].ToString();
                if (dict.ContainsKey(temp)) dict[temp]++;
                else dict.Add(temp, 1);
            }
            Console.WriteLine(dict.FirstOrDefault(x=>x.Value==dict.Values.Max()).Key);
        }
    }
}


using System;

namespace CodeFirstSimple
{
    class Program
    {
        static void Main()
        {
            var n = int.Parse(Console.ReadLine());
            var s = Console.ReadLine();
            var res = "";
            for (int i = 0, j = 0; i < n; j++, i += j)
                res += s[i];

            Console.WriteLine(res);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Vitaly_and_Strings
{
    class Program
    {
        static void Main(string[] args)
        {
            IO io = new IO();
            string str_S = io.ReadStr();
            string str_T = io.ReadStr();
            int[] i_S = new int[str_S.Length];
            int[] i_T = new int[str_T.Length];

            for (int i = 0; i < str_S.Length; i++)
            {
                i_S[i] = str_S[i] - 'a';
                i_T[i] = str_T[i] - 'a';
            }
            for (int i = str_S.Length-1; i >= 0; i--)
            {
                if (i_S[i] != 25)
                {
                    i_S[i]++; break;
                }
                else
                {
                    i_S[i] = 0;
                }
            }

            if (IO.Arr_Equal(i_S, i_T))
            {
                io.PutStr("No such string");
            }
            else
            {
                for (int i = 0; i < str_S.Length; i++)
                {
                    Console.Write(IO.Chr(i_S[i]+'a'));
                }
            }

            io.ReadStr();
        }
    }

    class IO
    {
        private static Queue<string> currentLineTokens = new Queue<string>();
        private static string[] ReadAndSplitLine()
        {
            return Console.ReadLine().Split(new[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
        }
        public int ReadNextInt()
        {
            return int.Parse(ReadToken());
        }
        public long ReadNextLong()
        {
            return long.Parse(ReadToken());
        }

        public int ReadInt()
        {
            return Convert.ToInt32(Console.ReadLine());
        }
        public long ReadLong()
        {
            return Convert.ToInt64(Console.ReadLine());
        }
        public string ReadStr()
        {
            return Console.ReadLine();
        }
        public string[] ReadStrArr()
        {
            return Console.ReadLine().Split(' ');
        }
        public int[] ReadIntArr()
        {
            return Array.ConvertAll<string, int>(Console.ReadLine().Split(' '), s => int.Parse(s));
        }
        public long[] ReadLongArr()
        {
            return Array.ConvertAll<string, long>(Console.ReadLine().Split(' '), s => long.Parse(s));
        }
        public void PutStr(string str)
        {
            Console.WriteLine(str);
        }
        public void PutStr(int str)
        {
            Console.WriteLine(str);
        }
        public void PutStr(long str)
        {
            Console.WriteLine(str);
        }
        public void PutStr(double str)
        {
            Console.WriteLine(str);
        }

        public static int Asc(char c_C)
        {
            System.Text.ASCIIEncoding asciiEncoding = new System.Text.ASCIIEncoding();
            int intAsciiCode = (int)asciiEncoding.GetBytes(c_C.ToString())[0];
            return (intAsciiCode);
        }

        public static char Chr(int asciiCode)
        {
            if (asciiCode >= 0 && asciiCode <= 255)
            {
                System.Text.ASCIIEncoding asciiEncoding = new System.Text.ASCIIEncoding();
                byte[] byteArray = new byte[] { (byte)asciiCode };
                char c_Character = asciiEncoding.GetString(byteArray)[0];
                return (c_Character);
            }
            else
            {
                throw new Exception("ASCII Code is not valid.");
            }
        }

        public static bool Arr_Equal(int[] array1, int[] array2)
        {

            if (array1.Length != array2.Length)

                return false;

            for (int i = 0; i < array1.Length; i++)

                if (array1[i] != array2[i])

                    return false;

            return true;

        }

        public static string ReadToken()
        {
            while (currentLineTokens.Count == 0)
                currentLineTokens = new Queue<string>(ReadAndSplitLine());
            return currentLineTokens.Dequeue();
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Codeforce
{

    class Program
    {
        static int[] parseInt(string s)
        {
            string[] temp = s.Split(' ');
            int[] res = new int[temp.Length];
            for (int i = 0; i < temp.Length; i++)
            {
                res[i] = Convert.ToInt32(temp[i]);
            }
            return res;
        }

        static double Dist(double x1, double y1, double x2, double y2)
        {
            return Math.Sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
        }
        struct Point
        {
            public double x { get; set; }
            public double y { get; set; }

            public Point(double _x, double _y)
                : this()
            {
                x = _x;
                y = _y;
            }
            public double DistTo(Point p2)
            {
                return Dist(x, y, p2.x, p2.y);
            }
        }

        static void Main(string[] args)
        {

            var data = parseInt(Console.ReadLine());

            Point cur = new Point(0, 0);
            Point next = new Point(0, 0);
            int dirX = 1, dirY = 0;
            for (int i = 1; i < 10000; i++)
            {
                next = new Point(cur.x + dirX * ((i + 1) / 2), cur.y + dirY * ((i + 1) / 2));
                double totalDist = cur.DistTo(next);
                double aDist = Dist((double)data[0], (double)data[1], cur.x, cur.y);
                double bDist = Dist((double)data[0], (double)data[1], next.x, next.y);

                if (totalDist - (aDist + bDist) < 0.000001 && totalDist - (aDist + bDist) >= 0)
                {
                    Console.WriteLine(i - 1);
                    return;
                }

                if (dirX > 0)
                {
                    dirX = 0;
                    dirY = 1;
                }
                else
                    if (dirX < 0)
                    {
                        dirX = 0;
                        dirY = -1;
                    }
                    else
                        if (dirY > 0)
                        {
                            dirX = -1;
                            dirY = 0;
                        }
                        else
                            if (dirY < 0)
                            {
                                dirX = 1;
                                dirY = 0;
                            }
                cur = next;
            }
        }
    }
}


using System;
using System.Collections.Generic;
using System.Text;

namespace _39h
{
    class Program
    {

        static string ToPos(Int32 k, Int32 pos)
        {
            string result = "";
            while (k > 0)
            {
                result = (k % pos).ToString() + result;
                k = k / pos;
            }
            return result;
        }

        static void PrintMatr(Int32[,] arr, Int32 pos)
        {
            if (pos == 10)
            {
                for (int i = 0; i < 9; i++)
                {
                    for (int j = 0; j < 9; j++)
                    {
                        Console.Write(arr[i, j].ToString()+" ");
                    }
                    Console.WriteLine();
                }
            }
            else
            {
                for (int i = 0; i < pos-1; i++)
                {
                    for (int j = 0; j < pos-1; j++)
                    {
                        Console.Write(ToPos(arr[i, j], pos)+ " ");
                    }
                    Console.WriteLine();
                }
            }
        }
        static void Main(string[] args)
        {
            Int32 pos = 0;
            pos = Convert.ToInt32(Console.ReadLine());
            Int32[,] arr = new Int32[9, 9];
            for(int i = 1;i<10;i++)
                for (int j = 1; j < 10; j++)
                {
                    arr[i-1, j-1] = i * j;
                }
            PrintMatr(arr, pos);
            //Console.ReadLine();
            //
        }
    }
}


using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;

// (づ°ω°)づﾐe★゜・。。・゜゜・。。・゜☆゜・。。・゜゜・。。・゜
public class Solver
{
    const int MOD = 1000000007;

    public void Solve()
    {
        int p = ReadInt();
        int k = ReadInt();

        long ans = 1;
        var f = new bool[p];
        for (int i = 1; i < p; i++)
            if (!f[i])
            {
                ans = ans * p % MOD;
                int x = i;
                while (!f[x])
                {
                    f[x] = true;
                    x = (int)(1L * x * k % p);
                }
            }
        if (k == 1)
            ans = ans * p % MOD;

        Write(ans);
    }

    #region Main

    protected static TextReader reader;
    protected static TextWriter writer;
    static void Main()
    {
#if DEBUG
        reader = new StreamReader("..\\..\\input.txt");
        //reader = new StreamReader(Console.OpenStandardInput());
        writer = Console.Out;
        //writer = new StreamWriter("..\\..\\output.txt");
#else
        reader = new StreamReader(Console.OpenStandardInput());
        writer = new StreamWriter(Console.OpenStandardOutput());
        //reader = new StreamReader("atoms.in");
        //writer = new StreamWriter("atoms.out");
#endif
        try
        {
            //var thread = new Thread(new Solver().Solve, 1024 * 1024 * 128);
            //thread.Start();
            //thread.Join();
            new Solver().Solve();
        }
        catch (Exception ex)
        {
            Console.WriteLine(ex);
#if DEBUG
#else
            throw;
#endif
        }
        reader.Close();
        writer.Close();
    }

    #endregion

    #region Read / Write
    private static Queue<string> currentLineTokens = new Queue<string>();
    private static string[] ReadAndSplitLine() { return reader.ReadLine().Split(new[] { ' ', '\t', }, StringSplitOptions.RemoveEmptyEntries); }
    public static string ReadToken() { while (currentLineTokens.Count == 0)currentLineTokens = new Queue<string>(ReadAndSplitLine()); return currentLineTokens.Dequeue(); }
    public static int ReadInt() { return int.Parse(ReadToken()); }
    public static long ReadLong() { return long.Parse(ReadToken()); }
    public static double ReadDouble() { return double.Parse(ReadToken(), CultureInfo.InvariantCulture); }
    public static int[] ReadIntArray() { return ReadAndSplitLine().Select(int.Parse).ToArray(); }
    public static long[] ReadLongArray() { return ReadAndSplitLine().Select(long.Parse).ToArray(); }
    public static double[] ReadDoubleArray() { return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); }
    public static int[][] ReadIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++)matrix[i] = ReadIntArray(); return matrix; }
    public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)
    {
        int[][] matrix = ReadIntMatrix(numberOfRows); int[][] ret = new int[matrix[0].Length][];
        for (int i = 0; i < ret.Length; i++) { ret[i] = new int[numberOfRows]; for (int j = 0; j < numberOfRows; j++)ret[i][j] = matrix[j][i]; } return ret;
    }
    public static string[] ReadLines(int quantity) { string[] lines = new string[quantity]; for (int i = 0; i < quantity; i++)lines[i] = reader.ReadLine().Trim(); return lines; }
    public static void WriteArray<T>(IEnumerable<T> array) { writer.WriteLine(string.Join(" ", array)); }
    public static void Write(params object[] array) { WriteArray(array); }
    public static void WriteLines<T>(IEnumerable<T> array) { foreach (var a in array)writer.WriteLine(a); }
    private class SDictionary<TKey, TValue> : Dictionary<TKey, TValue>
    {
        public new TValue this[TKey key]
        {
            get { return ContainsKey(key) ? base[key] : default(TValue); }
            set { base[key] = value; }
        }
    }
    private static T[] Init<T>(int size) where T : new() { var ret = new T[size]; for (int i = 0; i < size; i++)ret[i] = new T(); return ret; }
    #endregion
}


using System;

namespace codeforcing
{
    class Program
    {
        static void Main(string[] args)
        {
            //INPUT PHASE
            string[] tokens = Console.ReadLine().Split();
            int s = int.Parse(tokens[0]);
            int x1 = int.Parse(tokens[1]);
            int x2 = int.Parse(tokens[2]);

            tokens = Console.ReadLine().Split();

            int t1 = int.Parse(tokens[0]);
            int t2 = int.Parse(tokens[1]);

            tokens = Console.ReadLine().Split();

            int p = int.Parse(tokens[0]);
            int d = int.Parse(tokens[1]);

            int distanceWithTram = 0;
            if(p < x2 && x2 < x1)
            {
                //Console.WriteLine("am here 1");
                if (d == 1)
                {
                    distanceWithTram += s - p;

                }
                else
                {
                    distanceWithTram += p;
                    distanceWithTram += s;

                }

                distanceWithTram += s - x2;
            }
            else if(x1 < x2 && x2 < p)
            {
                //Console.WriteLine("am here 2");
                if (d == 1)
                {
                    distanceWithTram += s - p;
                    distanceWithTram += s;
                    distanceWithTram += x2;

                }
                else
                {
                    distanceWithTram += p;
                    distanceWithTram += x2;

                }

            }
            else if(p <= x1 && x1 < x2)
            {
                //Console.WriteLine("am here 3");
                if (d == 1)
                {
                    distanceWithTram += x2 - p;
                }

                else
                {
                    distanceWithTram += p;
                    distanceWithTram += x2;
                }
            }
            else if (x2 < x1 && x1 <= p)
            {
               // Console.WriteLine("am here 4");
                if (d == 1)
                {
                    distanceWithTram += s - p;
                    distanceWithTram += s - x2;
                }

                else
                {
                    distanceWithTram += p - x2;
                }
            }
            else if(x1<= p && p< x2)
            {
                //Console.WriteLine("am here 5");
                if (d == 1)
                {
                    distanceWithTram += s - p;
                    distanceWithTram += s;
                    distanceWithTram += x2;
                }

                else
                {
                    distanceWithTram += p;
                    distanceWithTram += x2;

                }
            }
            else if (x2 < p && p <= x1)
            {
               // Console.WriteLine("am here 6");
                if (d == 1)
                {

                    distanceWithTram += s - p;
                    distanceWithTram += s;
                    distanceWithTram += x2;
                }

                else
                {
                    distanceWithTram += p;
                    distanceWithTram += s;
                    distanceWithTram += s - x2;

                }
            }

            int timeWithNoTram = Math.Abs(x1 - x2) * t2;
            int timeWithTram = distanceWithTram * t1;

            Console.WriteLine((timeWithNoTram < timeWithTram ? timeWithNoTram : timeWithTram));

        }
    }
}


using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;

namespace CF
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            using (var sr = new InputReader(Console.In))
//			using (var sr = new InputReader(new StreamReader("input.txt")))
            using (var sw = Console.Out)
                //using (var sw = new StreamWriter("output.txt"))
            using (var task = new Task(sr, sw)) {
                task.Solve();
//                Console.ReadKey();
            }
        }
    }

    internal class Task : IDisposable
    {
        private readonly InputReader sr;
        private readonly TextWriter sw;
        private bool isDispose;

        private int minOper = Int32.MaxValue;

        private HashSet<int> used = new HashSet<int>();

        public Task(InputReader sr, TextWriter sw)
        {
            this.sr = sr;
            this.sw = sw;
        }

        public void Solve()
        {
            var n = sr.NextInt32();
            Solution(n, 0);
            if (minOper == Int32.MaxValue) {
                sw.WriteLine(-1);
            }
            else {
                sw.WriteLine(minOper);
            }
        }

        private void Solution(int n, int operCount)
        {
            if(used.Contains(n))
                return;
            used.Add(n);
            if(operCount > minOper)
                return;

            var sqrt = (int) Math.Sqrt(n);
            if (sqrt * sqrt == n) {
                minOper = Math.Min(minOper, operCount);
                return;
            }
            if(n < 10)
                return;

            var str = n.ToString().ToCharArray();
            for (var i = str.Length - 1; i >= 0; i--) {
                var newNumStr = new string(str, 0, i) + new string(str, i + 1, (str.Length - i - 1));
                if (newNumStr[0] != '0') {
                    Solution(Int32.Parse(newNumStr), operCount + 1);
                }
            }
        }

        ~Task()
        {
            Dispose(false);
        }

        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }

        private void Dispose(bool disposing)
        {
            if (!isDispose) {
                if (disposing) {
                    if(sr != null)
                        sr.Dispose();

                    if(sw != null)
                        sw.Dispose();
                }

                isDispose = true;
            }
        }
    }
}

internal class InputReader : IDisposable
{
    private bool isDispose;
    private readonly TextReader sr;
    private string[] buffer;
    private int seek;

    public InputReader(TextReader stream)
    {
        sr = stream;
    }

    public void Dispose()
    {
        Dispose(true);
        GC.SuppressFinalize(this);
    }

    public string NextString()
    {
        var result = sr.ReadLine();
        return result;
    }

    public int NextInt32()
    {
        return Int32.Parse(ReadNextToken());
    }

    private string ReadNextToken()
    {
        if (buffer == null || seek == buffer.Length) {
            seek = 0;
            buffer = NextSplitStrings();
        }

        return buffer[seek++];
    }

    public long NextInt64()
    {
        return Int64.Parse(ReadNextToken());
    }

    public int[] ReadArrayOfInt32()
    {
        return ReadArray(Int32.Parse);
    }

    public long[] ReadArrayOfInt64()
    {
        return ReadArray(Int64.Parse);
    }

    public string[] NextSplitStrings()
    {
        return NextString()
            .Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
    }

    public T[] ReadArray<T>(Func<string, CultureInfo, T> func)
    {
        return NextSplitStrings()
            .Select(s => func(s, CultureInfo.InvariantCulture))
            .ToArray();
    }

    public T[] ReadArrayFromString<T>(Func<string, CultureInfo, T> func, string str)
    {
        return
            str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
                .Select(s => func(s, CultureInfo.InvariantCulture))
                .ToArray();
    }

    protected void Dispose(bool dispose)
    {
        if (!isDispose)
        {
            if (dispose)
                sr.Close();

            isDispose = true;
        }
    }

    ~InputReader()
    {
        Dispose(false);
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp73
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] inp0 = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int n = inp0[0];
            int k = inp0[1];
            int min = 0;
            long max = Math.Min(n - k, k * 2);
            if (k > 0)
            {
                min = 1;
            }
            else
            {
                max = 0;
            }
            if (n-k==0)
            {
                min = 0;
            }
            Console.WriteLine(min + " " + max);

        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;

namespace codeforces
{
	class Program
	{
		public const int Osn = 1000000007;

		public class Pair
		{
			public long First;

			public long Second;
		}

		public class PairComparer : IComparer<Pair>
		{
			public int Compare(Pair x, Pair y)
			{
				if (x.First < y.First || (x.First == y.First && x.Second > y.Second))
					return -1;
				return 1;
			}
		}

		public static long ans = 0;

		public static long GetGcd(long a, long b)
		{
			while (true)
			{
				if (b == 0)
					return a;
				var a1 = a;
				a = b;
				ans += a1 / b;
				b = a1 % b;

			}
		}

		public static void WriteYesNo(bool x, string yes = "YES", string no = "NO")
		{
			if (x)
				Console.WriteLine(yes);
			else
			{
				Console.WriteLine(no);
			}
		}

		public static string ReadString()
		{
			return Console.ReadLine();
		}

		public static List<int> ReadListOfInts()
		{
			var s = Console.ReadLine();
			return s.Split(' ').Select(int.Parse).ToList();
		}

		public static List<long> ReadListOfLongs()
		{
			var s = Console.ReadLine();
			return s.Split(' ').Select(long.Parse).ToList();
		}

		public static int ReadInt()
		{
			var s = Console.ReadLine();
			return int.Parse(s);
		}

		public static long ReadLong()
		{
			var s = Console.ReadLine();
			return long.Parse(s);
		}

		public class Vertex
		{
			public int Was;

			public List<int> Edges;
		}

		public static List<Vertex> Graph = new List<Vertex>();

		public static bool Dfs(int u)
		{
			if (Graph[u].Was == 1) return true;
			if (Graph[u].Was == 2) return false;
			Graph[u].Was = 1;
			foreach (var t in Graph[u].Edges)
			{
				if (Dfs(t)) return true;
			}

			Graph[u].Was = 2;
			return false;
		}

		public static bool IsPrime(int x)
		{
			for (var j = 2; j * j <= x; ++j)
				if (x % j == 0)
					return false;
			return true;
		}

		public class LinkedVertex
		{
			public int Next;

			public int Prev;

			public int Value;
		}

		public static int BinarySearch(List<int> list, int value)
		{
			var l = -1;
			var r = list.Count;
			while (r - l > 1)
			{
				var m = (r + l) / 2;
				if (list[m] >= value)
					r = m;
				else
					l = m;
			}

			return r;
		}

		private static void Main()
		{
/*			var n = ReadInt();
			var l = ReadListOfInts();
			l.Sort();
			var sum = l.Sum();
			var t = n * l[n - 1];
			if (t - sum >= l[n - 1])
				Console.WriteLine(l[n - 1]);
			else
			{
				Console.WriteLine(l[n - 1] + 1);
			}*/
			var s = ReadString();
			var s1 = ReadString();
			var days = new int[] { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
			var can = false;
			var dd = new string[] { "monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday" };
			var d1 = 0;
			var d2 = 0;
			for (var i = 0; i < 7; ++i)
			{
				if (s.Equals(dd[i]))
					d1 = i;
				if (s1.Equals(dd[i]))
					d2 = i;
			}
			var diffs = (7 + d2 - d1) % 7;
			for (var i = 1; i < 12; ++i)
				if (days[i] % 7 == diffs)
					can = true;
			WriteYesNo(can);
			Console.ReadLine();
		}
	}
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace B
{
	class Program
	{
		static void Main(string[] args)
		{
			int n = Int32.Parse(Console.ReadLine()); int startn = n;
			int sqrt = (int)Math.Sqrt(n) + 1;
			int[] a = new int[n + 1];
			int[] divs = new int[sqrt];
			a[0] = 1; a[1] = 1;
			int l = 0;
			for (int i = 2; i <= n; i++)
			{
				if (a[i] == 0)
				{
					for (int j = i + i; j <= n; j += i)
					{
						a[j] = 1;
					}
				}
			}
			for (int i = 2; i <= n; i++)
			{
				if ((a[i] == 0) && (n % i == 0))
				{
					divs[l] = i;
					//Console.WriteLine("div " + l + " = " + i);
					l++;
				}
			}
			int[] q = new int[l];
			int answer = 1;
			for (int i = 0; i < l; i++)
			{
				answer *= divs[i];
				while (n % divs[i] == 0)
				{
					q[i]++;
					n = n / divs[i];
				}
			}

			bool b = true;
			for (int i = 0; i < l; i++)
			{
				if (q[i] != 1)
				{
					b = false;
					break;
				}
			}
			if (b)
			{
				Console.WriteLine(startn + " " + 0);
				return;
			}

			int max = 0;
			for (int i = 0; i < l; i++)
			{
				if (max < q[i]) max = q[i];
			}
			int[] pows = new int[21];
			pows[0] = 1;
			for (int i = 1; i < 21; i++)
			{
				pows[i] = pows[i - 1] * 2;
			}
			int s = 0;
			while (max > pows[s]) s++;
			//Console.WriteLine("pows[s] = " + pows[s]);
			if (max == pows[s])
			{
				for (int i = 0; i < l; i++)
				{
					if (q[i] < pows[s])
					{
						Console.WriteLine(answer + " " + (1 + s));
						return;
					}
				}
				Console.WriteLine(answer + " " + s);
			}
			else
			{
				Console.WriteLine(answer + " " + (1 + s));
			}
		}
	}
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Xml.Xsl;

namespace Codeforces
{
	class Program
	{
		static void Main(string[] args)
		{
			string input1 = Console.ReadLine();
			//string input2 = Console.ReadLine();

			//string input3 = Console.ReadLine();
			//string input4 = Console.ReadLine();

			//var inputs1 = input1.Split(new[] {' ', '}', '{', ','}, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToArray();
			//var inputs2 = input2.Split(new[] { ' ', '}', '{', ',' }, StringSplitOptions.RemoveEmptyEntries).Select(long.Parse).ToArray();
			//var inputs3 = input3.Split(new[] { ' ', '}', '{', ',' }, StringSplitOptions.RemoveEmptyEntries).Select(long.Parse).ToArray();
			//var inputs4 = input4.Split(new[] { ' ', '}', '{', ',' }, StringSplitOptions.RemoveEmptyEntries).Select(long.Parse).ToArray();

			int n = int.Parse(input1);

			var copyN = n;
			var f = copyN / 36;
			copyN -= 36 * f;

			var d = copyN / 3;
			copyN -= 3 * d;
			if (copyN > 1)
			{
				d++;
			}

			while (d > 11)
			{
				d -= 12;
				f++;
			}

			Console.WriteLine($"{f} {d}");
		}

		public class Team
		{
			public string Name { get; set; }

			public int Points { get; set; }

			public int GoalsFor { get; set; }

			public int GoalsAgainst { get; set; }
		}

		static long Factorial(long a)
		{
			return a > 1 ? a * Factorial(a - 1) : 1;
		}
	}
}


using System;

namespace ConsoleApplication1
{
    public static class Problem391A
    {
        private static int Solve(string s)
        {
            var a = s[0];
            var b = 0;
            var d = 0;
            foreach (var c in s)
            {
                if (a == c)
                {
                    b++;
                }
                else
                {
                    if (b % 2 == 0) d++;
                    b = 1;
                }
                a = c;
            }

            return d + (b%2==0?1:0);
        }

        private static void Run()
        {
            var a = Console.ReadLine();
            Console.WriteLine(Solve(a));
        }

        public static void Main(string[] args)
        {
            Problem391A.Run();
        }

    }
}


using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;

namespace Codeforces
{
	internal class Template
	{
		private void Solve()
		{
			var n = cin.NextInt();
			var k = cin.NextInt();
			var a = new int[n];
			var pos = new Queue<int>[n + 10];
			for (var i = 0; i < pos.Length; i++)
			{
				pos[i] = new Queue<int>();
			}
			for (var i = 0; i < n; i++)
			{
				a[i] = cin.NextInt();
				pos[a[i]].Enqueue(i);
			}
			var have = new HashSet<int>();
			var timesNeeded = new SortedDictionary<int, int>();
			var res = 0;
			for (var i = 0; i < a.Length; i++)
			{
				if (!have.Contains(a[i]))
				{
					if (have.Count == k)
					{
						var first = timesNeeded.First();
						timesNeeded.Remove(first.Key);
						have.Remove(first.Value);
					}
					have.Add(a[i]);
					if (i != pos[a[i]].Peek())
					{
						throw new AccessViolationException();
					}
					pos[a[i]].Dequeue();
					if (!pos[a[i]].Any())
					{
						timesNeeded.Add(-1000000000 + i, a[i]);
					}
					else
					{
						timesNeeded.Add(-pos[a[i]].Peek(), a[i]);
					}
					res++;
				}
				else
				{
					var p = pos[a[i]].Dequeue();
					timesNeeded.Remove(-p);
					if (!pos[a[i]].Any())
					{
						timesNeeded.Add(-1000000000 + i, a[i]);
					}
					else
					{
						timesNeeded.Add(-pos[a[i]].Peek(), a[i]);
					}
				}
			}
			Console.WriteLine(res);
		}

		private static readonly Scanner cin = new Scanner();

		private static void Main()
		{
#if DEBUG
			var inputText = File.ReadAllText(@"..\..\input.txt");
			var testCases = inputText.Split(new[] { "input" }, StringSplitOptions.RemoveEmptyEntries);
			var consoleOut = Console.Out;
			for (var i = 0; i < testCases.Length; i++)
			{
				var parts = testCases[i].Split(new[] { "output" }, StringSplitOptions.RemoveEmptyEntries);
				Console.SetIn(new StringReader(parts[0].Trim()));
				var stringWriter = new StringWriter();
				Console.SetOut(stringWriter);
				var sw = Stopwatch.StartNew();
				new Template().Solve();
				sw.Stop();
				var output = stringWriter.ToString();

				Console.SetOut(consoleOut);
				var color = ConsoleColor.Green;
				var status = "Passed";
				if (parts[1].Trim() != output.Trim())
				{
					color = ConsoleColor.Red;
					status = "Failed";
				}
				Console.ForegroundColor = color;
				Console.WriteLine("Test {0} {1} in {2}ms", i + 1, status, sw.ElapsedMilliseconds);
			}
			Console.ReadLine();
			Console.ReadKey();
#else
			new Template().Solve();
			Console.ReadLine();
#endif
		}
	}

	internal class Scanner
	{
		private string[] s = new string[0];
		private int i;
		private readonly char[] cs = { ' ' };

		public string NextString()
		{
			if (i < s.Length) return s[i++];
			var line = Console.ReadLine() ?? string.Empty;
			s = line.Split(cs, StringSplitOptions.RemoveEmptyEntries);
			i = 1;
			return s.First();
		}

		public double NextDouble()
		{
			return double.Parse(NextString());
		}

		public int NextInt()
		{
			return int.Parse(NextString());
		}

		public long NextLong()
		{
			return long.Parse(NextString());
		}
	}
}


using System;

namespace CF172_2
{
    class Program
    {
        static void Main(string[] args)
        {
            char[] ch = (Console.ReadLine()).ToCharArray();
            ch[0] = char.ToUpper(ch[0]);
            Console.WriteLine(ch);
        }
    }
}


#if DEBUG
using System.Reflection;
using System.Threading.Tasks;
#endif

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Numerics;
using System.Globalization;

#if DEBUG
using System.Diagnostics;
#endif

namespace _499b
{
    class Program
    {
        static string _inputFilename = "input.txt";
        static string _outputFilename = "output.txt";
        static bool _useFileInput = false;
        const string _delim = "!";

        static void Main(string[] args)
        {
            StreamWriter file = null;
#if DEBUG
            var testNumber = 0;
            var timer = new Stopwatch();
            foreach (var test in GetTests())
            {

                timer.Start();

                var defaultColor = Console.ForegroundColor;
                Console.ForegroundColor = ConsoleColor.DarkYellow;
                Console.WriteLine($"<!-- TEST #{testNumber} -->");
                Console.ForegroundColor = defaultColor;
                Console.SetIn(test);

#else
            if (_useFileInput)
            {
                Console.SetIn(File.OpenText(_inputFilename));
                file = new StreamWriter(_outputFilename);
                Console.SetOut(file);
            }
#endif

            try
            {
                Solution();
            }
            finally
            {
                if (_useFileInput)
                {
                    file.Close();
                }
            }

#if DEBUG
                timer.Stop();

                Console.ForegroundColor = ConsoleColor.DarkYellow;
                Console.WriteLine($"<!-- TEST #{testNumber} FINISHED IN {timer.Elapsed.ToString(@"ss\:fff")}-->");
                Console.ForegroundColor = defaultColor;

                timer.Reset();
                testNumber++;
            }
#endif
        }

        static void Solution()
        {
            #region SOLUTION

            var d = ReadIntArray();
            var n = d[0];
            var m = d[1];
            var a = ReadIntArray();
            var ts = new Dictionary<int, int>();
            for (int i = 0; i < m; i++)
            {
                var nt = a[i];
                if (!ts.ContainsKey(nt))
                {
                    ts[nt] = 0;
                }

                ts[nt]++;
            }

            var tts = ts.Values.ToArray();
            var r = 1000 * 1000;
            var l = 0;
            while (true)
            {
                if (l == r)
                {
                    break;
                }

                //Console.WriteLine("{0} {1}", l, r);
                var mid = l + (r - l + 1) / 2;

                if (mid == 3)
                {

                }
                var canSr = 0;
                for (int i = 0; i < tts.Length; i++)
                {
                    var count = tts[i];
                    canSr += count / mid;
                }

                if (canSr >= n)
                {
                    l = mid;
                }
                else
                {
                    r = mid - 1;
                }
            }

            Console.WriteLine(l);
            //var n = readInt();
            //var m = readInt();

            //var a = readIntArray();
            //var b = readIntArray();
            #endregion
        }

        static int ReadInt()
        {
            return int.Parse(Console.ReadLine());
        }

        static long ReadLong()
        {
            return long.Parse(Console.ReadLine());
        }

        static int[] ReadIntArray()
        {
            return Console.ReadLine().Split(' ').Where(i => !string.IsNullOrEmpty(i)).Select(i => int.Parse(i)).ToArray();
        }

        static long[] ReadLongArray()
        {
            return Console.ReadLine().Split(' ').Where(i => !string.IsNullOrEmpty(i)).Select(i => long.Parse(i)).ToArray();
        }

#if DEBUG
        static IEnumerable<TextReader> GetTests()
        {
            var tests = new List<string>();
            var resName = Assembly.GetCallingAssembly().GetManifestResourceNames()[0];
            using (var resource = new StreamReader(Assembly.GetCallingAssembly().GetManifestResourceStream(resName)))
            {
                while (true)
                {
                    var nextText = new StringBuilder();
                    var endOfFile = false;
                    while (true)
                    {
                        var line = resource.ReadLine();

                        endOfFile = line == null;
                        if (endOfFile)
                        {
                            break;
                        }

                        if (line.Equals(_delim, StringComparison.Ordinal))
                        {
                            break;
                        }

                        nextText.AppendLine(line);
                    }

                    yield return new StringReader(nextText.ToString());

                    if (endOfFile)
                    {
                        break;
                    }
                }
            }
        }
#endif
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            char[] ch = s.ToCharArray();
            int [] mas=new int [ch.Length];
            for (int i = 0; i < ch.Length; i++)
            {
                mas[i] = (int)ch[i]-48;
            }
            int t = 0,k=0,t2=0;
            for (int i = 0; i < mas.Length; i++)
            {
                if (mas[i] == 4 || mas[i] == 7)
                {
                    t++; k++;
                    if (t >= 2) { t2=t; }
                }
            }
            if (t2 >= 2 && k == 4 || k == 7) { Console.Write("YES"); }
            else Console.Write("NO");
            Console.ReadLine();
        }
    }


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Text.RegularExpressions;

namespace first
{
    class Program
    {
        static TextReader tr;
        static void cin(out int value)
        {
            if (tr == null) tr = Console.In;
            StringBuilder sb = new StringBuilder();
            while (tr.Peek() == (char)(' ') || tr.Peek() == 13 || tr.Peek() == 10)
                tr.Read();
            while (tr.Peek() != (char)(' ') && tr.Peek() != 13 && tr.Peek() != 10)
            {
                char ch = (char)tr.Read();
                sb.Append(ch);
            }
            value = int.Parse(sb.ToString());
        }
        static void cin(out string value)
        {
            if (tr == null) tr = Console.In;
            StringBuilder sb = new StringBuilder();
            while (tr.Peek() == (char)(' ') || tr.Peek() == 13 || tr.Peek() == 10)
                tr.Read();
            while (tr.Peek() != (char)(' ') && tr.Peek() != 13 && tr.Peek() != 10)
            {
                char ch = (char)tr.Read();
                sb.Append(ch);
            }
            value = sb.ToString();
        }
        static void cin(out double value)
        {
            if (tr == null) tr = Console.In;
            StringBuilder sb = new StringBuilder();
            while (tr.Peek() == (char)(' ') || tr.Peek() == 13 || tr.Peek() == 10)
                tr.Read();
            while (tr.Peek() != (char)(' ') && tr.Peek() != 13 && tr.Peek() != 10)
            {
                char ch = (char)tr.Read();
                if (ch == '.') ch = ',';
                sb.Append(ch);
            }
            value = double.Parse(sb.ToString());
        }
        static void Main(string[] args)
        {
            int n,m;
            cin(out n);
            cin(out m);
            m=m%((n+1)*n/2);
            for (int i = 0; i%n+1 <= m; i++)
            {
                m = m - (i % n + 1);
            }
            Console.WriteLine(m.ToString());
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp12
{
    class Program
    {
        static int func(int n)
        {
            if (n == 1) return 1;
            if (n == 2) return 2;
            if (n == 3) return 4;
            return n + func(n - 2);
        }

        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            Console.WriteLine(func(n));
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;

namespace Codeforces
{
	static class Program
	{
		static void Main(string[] args)
		{
			var rc = Console.ReadLine().Split().Select(int.Parse).ToList();
			var res = "";

			// rook
			if (rc[0] == rc[2] || rc[1] == rc[3]) res += "1 ";
			else res += "2 ";

			// bishop
			if ((rc[0] + rc[1]) % 2 == (rc[2] + rc[3]) % 2)
			{
				if (rc[0] + rc[1] == rc[2] + rc[3] || rc[0] - rc[1] == rc[2] - rc[3]) res += "1 ";
				else res += "2 ";
			}
			else res += "0 ";

			// king
			res += Math.Max(Math.Abs(rc[0] - rc[2]), Math.Abs(rc[1] - rc[3])).ToString();
			Console.WriteLine(res);
			Console.ReadLine();
		}

	}
}


using System;

namespace Rounding
{
    class Program
    {
        static void Main(string[] args)
        {
            int operand = 10,
            input = System.Convert.ToInt32(Console.ReadLine().Trim()),
            mod = input % operand,
            res;
            if (mod > 0 && mod <= 5)
            {
                res = input - mod;
            }
            else if (mod > 5)
            {
                res = input + (operand - mod);
            }
            else
            {
                res = input;
            }

            System.Console.WriteLine(res);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;

namespace Codeforces
{
    class B
    {
        private static ThreadStart s_threadStart = new B().Go;
        private static bool s_time = false;

        private void Go()
        {
            int w = GetInt();
            int h = GetInt();
            long ret = 0;
            for (int x = 1; x < w; x++)
            {
                for (int y = 1; y < h; y++)
                {
                    ret += (long)Math.Min(x, w - x) * (long)Math.Min(y, h - y);
                }
            }

            Wl(ret);
        }

        #region Template

        public static void Main(string[] args)
        {
            System.Diagnostics.Stopwatch timer = new System.Diagnostics.Stopwatch();
            Thread main = new Thread(new ThreadStart(s_threadStart), 512 * 1024 * 1024);
            timer.Start();
            main.Start();
            main.Join();
            timer.Stop();
            if (s_time)
                Wl(timer.ElapsedMilliseconds);
        }

        private static IEnumerator<string> ioEnum;
        private static string GetString()
        {
            while (ioEnum == null || !ioEnum.MoveNext())
            {
                ioEnum = Console.ReadLine().Split().AsEnumerable().GetEnumerator();
            }

            return ioEnum.Current;
        }

        private static int GetInt()
        {
            return int.Parse(GetString());
        }

        private static long GetLong()
        {
            return long.Parse(GetString());
        }

        private static double GetDouble()
        {
            return double.Parse(GetString());
        }

        private static List<int> GetIntArr(int n)
        {
            List<int> ret = new List<int>(n);
            for (int i = 0; i < n; i++)
            {
                ret.Add(GetInt());
            }
            return ret;
        }

        private static void Wl<T>(T o)
        {
            if (o is double)
            {
                Wld((o as double?).Value, "");
            }
            else if (o is float)
            {
                Wld((o as float?).Value, "");
            }
            else
                Console.WriteLine(o.ToString());
        }

        private static void Wl<T>(IEnumerable<T> enumerable)
        {
            Wl(string.Join(" ", enumerable.Select(e => e.ToString()).ToArray()));
        }

        private static void Wld(double d, string format)
        {
            Wl(d.ToString(format, CultureInfo.InvariantCulture));
        }

        public struct Tuple<T, K> : IComparable<Tuple<T, K>>
            where T : IComparable<T>
            where K : IComparable<K>
        {
            public T Item1;
            public K Item2;

            public Tuple(T t, K k)
            {
                Item1 = t;
                Item2 = k;
            }

            public override bool Equals(object obj)
            {
                var o = (Tuple<T, K>)obj;
                return o.Item1.Equals(Item1) && o.Item2.Equals(Item2);
            }

            public override int GetHashCode()
            {
                return Item1.GetHashCode() ^ Item2.GetHashCode();
            }

            public override string ToString()
            {
                return "(" + Item1 + " " + Item2 + ")";
            }

            #region IComparable<Tuple<T,K>> Members

            public int CompareTo(Tuple<T, K> other)
            {
                int ret = Item1.CompareTo(other.Item1);
                if (ret != 0) return ret;
                return Item2.CompareTo(other.Item2);
            }

            #endregion
        }

        #endregion
    }
}