{"trustable":false,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"MD","content":"Download the problem statement by opening the following [link](https://drive.google.com/file/d/1wI7dCpnqUrBmuDzzB34d7In2EzV9nxIV/view?usp\u003dsharing) **on a new tab**, then use the password provided in the *announcement*.\n\n### Contoh Masukan 1\n\n```\n5 5 0\nS....\nMMMM.\n.....\n.MMMM\n....F\n```\n\n### Contoh Keluaran 1\n\n```\n16\n```\n\n\n### Contoh Masukan 2\n\n```\n3 3 1\nS..\n.M.\n..F\n```\n\n### Contoh Keluaran 2\n\n```\n-1\n```\n\n### Contoh Masukan 3\n\n```\n1 3 1\nSFM\n```\n\n### Contoh Keluaran 3\n\n```\n-1\n```\n\n### Contoh Masukan 4\n\n```\n1 3 1\nMSF\n```\n\n### Contoh Keluaran 4\n\n```\n-1\n```"}}]}