#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1024000000,1024000000")
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3fLL;
const int dx[] = {-1, 0, 1, 0, 1, -1, -1, 1};
const int dy[] = {0, 1, 0, -1, -1, 1, -1, 1};
const int maxn = 100 + 10;
const int maxx = 1e4 + 10;
const double EPS = 1e-8;
const double eps = 1e-8;
const int mod = 1e9 + 7;
template <class T>
inline T min(T a, T b, T c) {
  return min(min(a, b), c);
}
template <class T>
inline T max(T a, T b, T c) {
  return max(max(a, b), c);
}
template <class T>
inline T min(T a, T b, T c, T d) {
  return min(min(a, b), min(c, d));
}
template <class T>
inline T max(T a, T b, T c, T d) {
  return max(max(a, b), max(c, d));
}
template <class T>
inline bool scan_d(T &ret) {
  char c;
  int sgn;
  if (c = getchar(), c == EOF) return 0;
  while (c != '-' && (c < '0' || c > '9')) c = getchar();
  sgn = (c == '-') ? -1 : 1;
  ret = (c == '-') ? 0 : (c - '0');
  while (c = getchar(), c >= '0' && c <= '9') ret = ret * 10 + (c - '0');
  ret *= sgn;
  return 1;
}
inline bool scan_lf(double &num) {
  char in;
  double Dec = 0.1;
  bool IsN = false, IsD = false;
  in = getchar();
  if (in == EOF) return false;
  while (in != '-' && in != '.' && (in < '0' || in > '9')) in = getchar();
  if (in == '-') {
    IsN = true;
    num = 0;
  } else if (in == '.') {
    IsD = true;
    num = 0;
  } else
    num = in - '0';
  if (!IsD) {
    while (in = getchar(), in >= '0' && in <= '9') {
      num *= 10;
      num += in - '0';
    }
  }
  if (in != '.') {
    if (IsN) num = -num;
    return true;
  } else {
    while (in = getchar(), in >= '0' && in <= '9') {
      num += Dec * (in - '0');
      Dec *= 0.1;
    }
  }
  if (IsN) num = num;
  return true;
}
void Out(long long a) {
  if (a < 0) {
    putchar('-');
    a = -a;
  }
  if (a >= 10) Out(a / 10);
  putchar(a % 10 + '0');
}
void print(long long a) { Out(a), puts(""); }
struct node {
  int x, y, s;
  node() {}
  node(int _x, int _y, int _s) {
    x = _x;
    y = _y;
    s = _s;
  }
};
vector<node> v;
char g[maxn][maxn];
bool vis[maxn][maxn];
int n, m;
void solve(int x, int y) {
  int ans = 1, f = 1, flag = 0;
  while (f) {
    for (int i = 0; i < 4; i++) {
      int xx = x + dx[i] * ans, yy = y + dy[i] * ans;
      if (xx < 0 || yy < 0 || xx >= n || yy >= m || g[xx][yy] != '*') {
        f = 0;
        break;
      }
    }
    if (f) {
      vis[x + dx[0] * ans][y + dy[0] * ans] =
          vis[x + dx[1] * ans][y + dy[1] * ans] =
              vis[x + dx[2] * ans][y + dy[2] * ans] =
                  vis[x + dx[3] * ans][y + dy[3] * ans] = vis[x][y] = true;
      flag = 1;
      ans++;
    } else
      break;
  }
  if (flag) v.push_back({x + 1, y + 1, ans - 1});
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) scanf("%s", g[i]);
  memset(vis, false, sizeof(vis));
  ;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      if (g[i][j] == '*') solve(i, j);
    }
  bool flag = true;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (g[i][j] == '*' && !vis[i][j]) {
        flag = false;
        break;
      }
    }
    if (!flag) break;
  }
  if (!flag || v.size() > n * m)
    printf("-1\n");
  else {
    printf("%d\n", (int)v.size());
    for (__typeof((v).begin()) it = (v).begin(); it != (v).end(); it++)
      printf("%d %d %d\n", it->x, it->y, it->s);
  }
}
