#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
template <typename T, typename TT>
inline ostream &operator<<(ostream &os, const pair<T, TT> &t) {
  return os << t.first << " " << t.second;
}
template <typename T>
inline ostream &operator<<(ostream &os, const vector<T> &t) {
  for (T i : t) os << i << " ";
  return os;
}
template <typename T>
inline ostream &operator<<(ostream &os, const set<T> &t) {
  for (T &i : t) os << i << " ";
  return os;
}
template <typename T1, typename T2>
inline ostream &operator<<(ostream &os, const map<T1, T2> &t) {
  for (auto &i : t) os << i.first << " : " << i.second << '\n';
  return os;
}
template <typename T>
inline istream &operator>>(istream &is, vector<T> &v) {
  for (T &t : v) is >> t;
  return is;
}
template <typename T1, typename T2>
inline istream &operator>>(istream &is, vector<pair<T1, T2>> &v) {
  for (pair<T1, T2> &t : v) is >> t.first >> t.second;
  return is;
}
const long long mod = 1e9 + 7;
void solve() {
  long long n, m;
  cin >> n >> m;
  vector<string> s(n);
  cin >> s;
  map<pair<long long, long long>, bool> mp;
  vector<vector<long long>> ans;
  for (int i = 1; i < n - 1; i++) {
    for (int j = 1; j < m - 1; j++) {
      if (s[i][j] == '*') {
        vector<long long> v(4, 0);
        for (int k = j + 1; k < m and s[i][k] == '*'; k++, v[0]++)
          ;
        for (int k = j - 1; k >= 0 and s[i][k] == '*'; k--, v[1]++)
          ;
        for (int k = i + 1; k < n and s[k][j] == '*'; k++, v[2]++)
          ;
        for (int k = i - 1; k >= 0 and s[k][j] == '*'; k--, v[3]++)
          ;
        long long mn = *min_element(v.begin(), v.end());
        if (mn) {
          mp[{i, j}] = 1;
          ans.push_back({i + 1, j + 1, mn});
        }
        for (int k = 1; k <= mn; k++) {
          mp[{i, j + k}] = 1;
          mp[{i, j - k}] = 1;
          mp[{i + k, j}] = 1;
          mp[{i - k, j}] = 1;
        };
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (!mp[{i, j}] and s[i][j] == '*') {
        ;
        cout << -1 << '\n';
        return;
      }
    }
  }
  cout << ans.size() << '\n';
  for (auto x : ans) cout << x << '\n';
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
