#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define M 1000000007
int mp[101][101];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int n, m, h;
cin >> n >> m >> h;
for (int i = 0; i < n; ++i) {
for (int j = 0; j < m; ++j) {
cin >> mp[i][j];
}
}
int mod = 33;
// T1 pohja
for (int i = 0; i < n; ++i) {
for (int j = 0; j < m; ++j) {
cout << "V";
}
cout << "\n";
}
// T2, ... Tmod
for (int k = 0; k < mod - 1; ++k) {
for (int i = 0; i < n; ++i) {
for (int j = 0; j < m; ++j) {
if (mp[i][j] % mod == k + 1) {
cout << "S";
} else {
cout << "L";
}
}
cout << "\n";
}
}
// Jäljellä 39 - mod + 1 = 7
int left = 39 - mod + 1;
// T(mod + 1), ...
for (int m = mod; m <= h; m += mod) {
left--;
for (int i = 0; i < n; ++i) {
for (int j = 0; j < m; ++j) {
if (mp[i][j] >= m) {
cout << "V";
} else {
cout << "L";
}
}
cout << "\n";
}
}
while (left--) {
for (int i = 0; i < n; ++i) {
for (int j = 0; j < m; ++j) {
cout << "V";
}
cout << "\n";
}
}
for (int i = 1; i <= h; ++i) {
vector<int> ans;
ans.push_back(1);
for (int k = 0; k < (i % mod); ++k) {
ans.push_back(k + 2);
}
int level = i / mod;
if (level != 0)
ans.push_back(level + mod);
cout << ans.size() << " ";
for (int x : ans) {
cout << x << " ";
}
cout << "\n";
}
return 0;
}