#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  bool covered[n][m];
  int board[n][m];
  vector<tuple<int, int, int>> stars;
  char in;
  for (int i = (0); i < (n); ++i) {
    for (int j = (0); j < (m); ++j) {
      covered[i][j] = false;
      cin >> in;
      in == '*' ? board[i][j] = 1 : board[i][j] = 0;
    }
  }
  for (int row = (1); row < (n); ++row) {
    for (int column = (1); column < (m); ++column) {
      if (board[row][column] == 1) {
        int size = 0;
        while (column + size < m && column - size >= 0 && row + size < n &&
               row - size >= 0 && board[row][column + size] &&
               board[row][column - size] && board[row + size][column] &&
               board[row - size][column]) {
          ++size;
        }
        --size;
        if (size > 0) {
          stars.push_back(make_tuple(row + 1, column + 1, size));
          for (int i = (column - size); i < (column + size + 1); ++i) {
            covered[row][i] = true;
          }
          for (int i = (row - size); i < (row + size + 1); ++i) {
            covered[i][column] = true;
          }
        }
      }
    }
  }
  for (int row = (0); row < (n); ++row) {
    for (int column = (0); column < (m); ++column) {
      if (board[row][column] && !covered[row][column]) {
        cout << -1;
        return 0;
      }
    }
  }
  cout << (int)stars.size() << "\n";
  for (int i = (0); i < ((int)stars.size()); ++i) {
    cout << get<0>(stars[i]) << " " << get<1>(stars[i]) << " "
         << get<2>(stars[i]) << "\n";
  }
  return 0;
}
