#include <bits/stdc++.h>
using namespace std;
vector<vector<char> > A;
vector<vector<bool> > used;
long long n, m;
vector<pair<pair<long long, long long>, long long> > ans;
pair<long long, long long> f(long long x, long long y) {
  long long siza = 1e10;
  long long siz1 = 0;
  long long x1 = x, y1 = y;
  while (x1 + 1 < n && A[x1 + 1][y] == '*') {
    x1++;
    siz1++;
  }
  siza = min(siza, siz1);
  siz1 = 0;
  while (y1 + 1 < m && A[x][y1 + 1] == '*') {
    y1++;
    siz1++;
  }
  siza = min(siza, siz1);
  siz1 = 0;
  y1 = y;
  x1 = x;
  while (x1 - 1 >= 0 && A[x1 - 1][y] == '*') {
    x1--;
    siz1++;
  }
  siza = min(siza, siz1);
  siz1 = 0;
  while (y1 - 1 >= 0 && A[x][y1 - 1] == '*') {
    y1--;
    siz1++;
  }
  siza = min(siza, siz1);
  long long uss = 0;
  if (!used[x][y]) uss++;
  x1 = x;
  y1 = y;
  for (int i = 1; i <= siza; i++) {
    if (!used[x + i][y]) uss++;
    if (!used[x - i][y]) uss++;
    if (!used[x][y + i]) uss++;
    if (!used[x][y - i]) uss++;
  }
  if (uss > 0 && siza > 0) {
    for (int i = 1; i <= siza; i++) {
      used[x][y + i] = true;
      used[x][y] = true;
      used[x + i][y] = true;
      used[x][y - i] = true;
      used[x - i][y] = true;
    }
    ans.push_back({{x + 1, y + 1}, siza});
  } else {
    uss = 0;
  }
  return {uss, siza};
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  A.resize(n, vector<char>(m));
  used.resize(n, vector<bool>(m, true));
  long long kol = 0;
  vector<pair<long long, long long> > X;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> A[i][j];
      if (A[i][j] == '*') {
        kol++;
        used[i][j] = false;
        X.push_back({i, j});
      }
    }
  }
  bool yk = true;
  for (int k = 0; k < n * m && yk; k++) {
    bool yy = false;
    for (int i = 0; i < X.size(); i++) {
      long long x = X[i].first;
      long long y = X[i].second;
      long long uss = 0;
      long long siz = 0;
      auto z = f(x, y);
      uss = z.first;
      siz = z.second;
      kol -= uss;
      if (uss > 0) yy = true;
      if (kol == 0) {
        yk = false;
        break;
      }
    }
    if (!yy && kol > 0) {
      cout << "-1";
      return 0;
    }
  }
  if (kol != 0) {
    cout << "-1";
    return 0;
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i].first.first << " " << ans[i].first.second << " "
         << ans[i].second << "\n";
  }
}
