#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, m;
  scanf("%d %d", &n, &m);
  char a[n][m];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> a[i][j];
    }
  }
  vector<pair<pair<int, int>, int>> res;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (a[i][j] == '.') continue;
      int s = 0, ms = 1000000000;
      for (int k = j + 1; k < m && a[i][k] == '*'; k++) s++;
      ms = min(ms, s);
      s = 0;
      for (int k = j - 1; k >= 0 && a[i][k] == '*'; k--) s++;
      ms = min(ms, s);
      s = 0;
      for (int k = i + 1; k < n && a[k][j] == '*'; k++) s++;
      ms = min(ms, s);
      s = 0;
      for (int k = i - 1; k >= 0 && a[k][j] == '*'; k--) s++;
      ms = min(ms, s);
      if (ms > 0) res.push_back({{i, j}, ms});
    }
  }
  char b[n][m];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      b[i][j] = '.';
    }
  }
  for (size_t i = 0; i < res.size(); i++) {
    int x = res[i].first.first, y = res[i].first.second;
    int s = res[i].second;
    b[x][y] = '*';
    for (int i = x + 1, cnt = s; cnt > 0; cnt--, i++) {
      b[i][y] = '*';
    }
    for (int i = x - 1, cnt = s; cnt > 0; cnt--, i--) {
      b[i][y] = '*';
    }
    for (int i = y + 1, cnt = s; cnt > 0; cnt--, i++) {
      b[x][i] = '*';
    }
    for (int i = y - 1, cnt = s; cnt > 0; cnt--, i--) {
      b[x][i] = '*';
    }
  }
  bool flag = true;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (a[i][j] != b[i][j]) flag = false;
    }
  }
  if (flag) {
    printf("%d\n", res.size());
    for (size_t i = 0; i < res.size(); i++) {
      printf("%d %d %d\n", res[i].first.first + 1, 1 + res[i].first.second,
             res[i].second);
    }
  } else {
    printf("-1\n");
  }
}
signed main() {
  int Q = 1;
  while (Q--) {
    solve();
  }
  return 0;
}
