#include <bits/stdc++.h>
using namespace std;
const long long OO = (long long)(1e18) + 9;
const long long MOD = (long long)(1e9) + 7;
const int oo = 2147483647;
const double EPS = 1e-8;
const double PI = acos(-1.0);
int dx[] = {0, 1, 0, -1};
int dy[] = {1, 0, -1, 0};
int dX[] = {1, 0, -1, 0, 1, -1, 1, -1};
int dY[] = {0, 1, 0, -1, 1, 1, -1, -1};
char abc[] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
              'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
int dcmp(long double d1, long double d2) {
  return fabs(d1 - d2) <= EPS ? 0 : d1 > d2 ? 1 : -1;
}
long long gcd(long long x, long long y) { return !y ? x : gcd(y, x % y); }
long long lcm(long long a, long long b) { return a * (b / gcd(a, b)); }
int ord(int r, int c, int nCol) { return (nCol * r) + c + 1; }
pair<int, int> rord(int n, int nCol) {
  int r = n % nCol, c = n / nCol;
  if (n % nCol == 0) c--, r = nCol;
  return pair<int, int>(r, c);
}
int n, m;
vector<vector<int>> mat;
bool chk() {
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (mat[i][j]) return false;
  return true;
}
int main() {
  cin >> n >> m;
  mat.resize(n, vector<int>(m, 0));
  vector<string> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (v[i][j] == '*') mat[i][j] = 1;
  vector<pair<pair<int, int>, int>> ans;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      if (j && j != m - 1 && i && i != n - 1 && v[i][j] == '*') {
        int mn = 1000, ln1 = 0, ln2 = 0, ln3 = 0, ln4 = 0;
        for (int k = j + 1; k < m; k++) {
          if (v[i][k] == '*')
            ln1++;
          else
            break;
        }
        mn = min(mn, ln1);
        for (int k = j - 1; k >= 0; k--) {
          if (v[i][k] == '*')
            ln2++;
          else
            break;
        }
        mn = min(mn, ln2);
        for (int k = i + 1; k < n; k++) {
          if (v[k][j] == '*')
            ln3++;
          else
            break;
        }
        mn = min(mn, ln3);
        for (int k = i - 1; k >= 0; k--) {
          if (v[k][j] == '*')
            ln4++;
          else
            break;
        }
        mn = min(mn, ln4);
        if (mn) {
          for (int k = i - mn; k <= i + mn; k++) mat[k][j] = 0;
          for (int k = j - mn; k <= j + mn; k++) mat[i][k] = 0;
          ans.push_back(make_pair(pair<int, int>(i + 1, j + 1), mn));
        }
      }
    }
  if (!chk()) return puts("-1");
  cout << (int)ans.size() << endl;
  for (int i = 0; i < (int)ans.size(); i++)
    cout << ans[i].first.first << ' ' << ans[i].first.second << ' '
         << ans[i].second << endl;
  return 0;
}
