#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, m;
  cin >> n >> m;
  string s[n];
  for (long long i = 0; i < n; ++i) {
    cin >> s[i];
  }
  vector<pair<pair<long long, long long>, long long>> v;
  for (long long i = 0; i < n; ++i) {
    for (long long j = 0; j < m; ++j) {
      if (s[i][j] == '*') {
        long long x = i, y = j, ss = 0;
        long long x1 = i, x2 = i, y1 = j, y2 = j;
        while (x1 >= 0 && x2 < n && y1 >= 0 && y2 < m && s[x1][y] == '*' &&
               s[x2][y] == '*' && s[x][y1] == '*' && s[x][y2] == '*') {
          x1--;
          x2++;
          y1--;
          y2++;
          ss++;
        }
        if (ss > 1) v.push_back({{x, y}, ss});
      }
    }
  }
  for (auto i : v) {
    long long x = i.first.first;
    long long y = i.first.second;
    long long ss = i.second;
    long long x1 = x, x2 = x, y1 = y, y2 = y;
    while (ss--) {
      s[x1][y] = s[x2][y] = s[x][y1] = s[x][y2] = '.';
      x1--;
      x2++;
      y1--;
      y2++;
    }
  }
  for (long long i = 0; i < n; ++i) {
    for (long long j = 0; j < m; ++j) {
      if (s[i][j] == '*') {
        cout << -1;
        return 0;
      }
    }
  }
  cout << v.size() << "\n";
  for (auto i : v) {
    long long x = i.first.first;
    long long y = i.first.second;
    long long ss = i.second;
    cout << x + 1 << " " << y + 1 << " " << ss - 1 << "\n";
  }
  return 0;
}
