#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
int main() {
  int n, m;
  cin >> n >> m;
  vector<vector<char>> ingrid(n, vector<char>(m));
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      cin >> ingrid[i][j];
    }
  }
  using ttype = tuple<int, int, int>;
  vector<ttype> stars;
  for (int i = 1; i < n - 1; ++i) {
    for (int j = 1; j < m - 1; ++j) {
      int le{0};
      while ((j - le >= 0) && ingrid[i][j - le] == '*') {
        ++le;
      }
      int re{0};
      while ((j + re < m) && ingrid[i][j + re] == '*') {
        ++re;
      }
      int ue{0};
      while ((i - ue >= 0) && ingrid[i - ue][j] == '*') {
        ++ue;
      }
      int de{0};
      while ((i + de < n) && ingrid[i + de][j] == '*') {
        ++de;
      }
      int len = min({le, re, ue, de});
      if (len > 1) {
        stars.emplace_back(i, j, len);
      }
    }
  }
  vector<vector<char>> outgrid(n, vector<char>(m, '.'));
  for (auto& [r, c, len] : stars) {
    outgrid[r][c] = '*';
    for (int i = 1; i < len; ++i) {
      outgrid[r + i][c] = '*';
      outgrid[r - i][c] = '*';
      outgrid[r][c + i] = '*';
      outgrid[r][c - i] = '*';
    }
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      if (ingrid[i][j] != outgrid[i][j]) {
        cout << "-1\n";
        return 0;
      }
    }
  }
  cout << stars.size() << "\n";
  for (auto& [r, c, len] : stars) {
    cout << r + 1 << ' ' << c + 1 << ' ' << len - 1 << '\n';
  }
  return 0;
};
