#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  char a[n][m];
  int b[n][m];
  memset(b, 0, sizeof(b));
  vector<pair<pair<int, int>, int>> v;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    for (int j = 0; j < m; j++) a[i][j] = s[j];
  }
  for (int i = 1; i < n - 1; i++) {
    for (int j = 1; j < m - 1; j++) {
      if (a[i][j] == '*') {
        int an = 0;
        for (int k = 1;; k++) {
          if (a[i - k][j] != '*' || a[i + k][j] != '*' || a[i][j + k] != '*' ||
              a[i][j - k] != '*' || i - k < 0 || i + k >= n || j - k < 0 ||
              j + k >= m)
            break;
          else {
            b[i - k][j] = 1;
            b[i + k][j] = 1;
            b[i][j] = 1;
            b[i][j - k] = 1;
            b[i][j + k] = 1;
            an++;
          }
        }
        if (an > 0) {
          v.push_back({{i, j}, an});
        }
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (b[i][j] == 0 && a[i][j] == '*') {
        cout << -1;
        return 0;
      }
    }
  }
  cout << v.size() << '\n';
  for (int i = 0; i < v.size(); i++) {
    cout << v[i].first.first + 1 << " " << v[i].first.second + 1 << " "
         << v[i].second << '\n';
  }
}
