#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:255000000")
bool firstout = 1;
template <class T>
T &minn(T &a, T b) {
  if (b < a) a = b;
  return a;
}
template <class T>
T &maxx(T &a, T b) {
  if (a < b) a = b;
  return a;
}
int &madd(int &a, int b) {
  a += b;
  if (a >= 1000000007) a -= 1000000007;
  return a;
}
int &msub(int &a, int b) {
  a -= b;
  if (a < 0) a += 1000000007;
  return a;
}
int &mmult(int &a, int b) { return a = (long long)a * b % 1000000007; }
int mdiv(long long a, long long b, long long m) {
  a = (a % m + m) % m;
  b = (b % m + m) % m;
  if (a % b == 0) return a / b;
  return (a + m * mdiv(-a, m, b)) / b;
}
int n, m, q;
int n1, n2, n3;
char S[312345];
int A[312345];
int SA[312345];
pair<int, pair<int, int> > SP[312345], SPP[312345];
int SC[312345];
int LCP[312345];
void sufAr(char *S, int n) {
  int m = max(1000, n) + 1;
  int d, i, j, k;
  for (d = 0; d < n;) {
    if (d == 0) {
      for (i = 0; i < n; ++i) SP[i] = make_pair(i, make_pair(S[i], 0));
      d = 1;
    } else {
      for (i = 0; i < n; ++i)
        SP[i] = make_pair(j = (SPP[i].first - d + n) % n,
                          make_pair(SA[j], SPP[i].second.first));
      d <<= 1;
    }
    for (i = 0; i < m; ++i) SC[i] = 0;
    for (i = 0; i < n; ++i) ++SC[SP[i].second.first];
    for (i = 1; i < m; ++i) SC[i] += SC[i - 1];
    for (i = n - 1; i >= 0; --i) SPP[--SC[SP[i].second.first]] = SP[i];
    for (i = j = 0; i < n; ++i)
      SP[i] = SPP[i],
      SP[i].second.first = (j += (i && SPP[i].second != SPP[i - 1].second));
    for (i = 0; i < n; ++i) SPP[i] = SP[i];
    for (i = 0; i < n; ++i) SA[SP[i].first] = SP[i].second.first;
  }
  for (i = 0; i < n; ++i) SA[i] = SP[i].first;
  for (i = 0; i < n; ++i) SC[SA[i]] = i;
  int r = 0;
  for (i = 0; i < n; ++i) {
    if (r) --r;
    k = SC[i];
    if (k == 0) {
      r = 0;
      continue;
    }
    j = SA[k - 1];
    for (; i + r < n && j + r < n && S[i + r] == S[j + r]; ++r)
      ;
    LCP[k - 1] = r;
  }
}
struct point {
  int a, b, c;
  point() { a = b = c = 0; }
  void add(int i) {
    if (i < n1) {
      ++a;
      return;
    }
    i -= n1 + 1;
    if (i < n2) {
      ++b;
      return;
    }
    ++c;
  }
  void add(point &p) {
    a += p.a;
    b += p.b;
    c += p.c;
  }
  int dot() {
    int res = a;
    mmult(res, b);
    mmult(res, c);
    return res;
  }
};
void add(int i, int j, int x) {
  ++i;
  ++j;
  madd(A[i], x);
  msub(A[j], x);
}
int main() {
  int i, j, k;
  char c;
  int a, d;
  int ts;
  for (ts = 1; scanf("%"
                     "s",
                     &(S)) > 0;
       ++ts) {
    n1 = strlen(S);
    scanf("%s", S + n1 + 1);
    n2 = strlen(S + n1 + 1);
    scanf("%s", S + n1 + n2 + 2);
    n3 = strlen(S + n1 + n2 + 2);
    n = n1 + n2 + n3 + 3;
    S[n1] = 1;
    S[n1 + 1 + n2] = 2;
    sufAr(S, n);
    m = min(n1, min(n2, n3)) + 1;
    for (i = (0); i < (m + 1); ++i) A[i] = 0;
    for (i = (0); i < (n); ++i)
      if (S[SA[i]] > 2) break;
    vector<pair<int, point> > v;
    pair<int, point> p;
    v.push_back(make_pair(0, point()));
    for (i = (i); i < (n - 1); ++i) {
      if (LCP[i] <= v.back().first) {
        v.back().second.add(SA[i]);
        for (; LCP[i] < v.back().first && LCP[i] <= v[v.size() - 2].first;
             v.pop_back()) {
          add(v[v.size() - 2].first, v.back().first, v.back().second.dot());
          v[v.size() - 2].second.add(v.back().second);
        }
        add(LCP[i], v.back().first, v.back().second.dot());
        v.back().first = LCP[i];
        continue;
      }
      p = make_pair(LCP[i], point());
      p.second.add(SA[i]);
      v.push_back(p);
    }
    v.back().second.add(SA[i]);
    for (; v.size() > 1; v.pop_back()) {
      add(v[v.size() - 2].first, v.back().first, v.back().second.dot());
      v[v.size() - 2].second.add(v.back().second);
    }
    int res = 0;
    for (i = (1); i < (m); ++i) {
      madd(res, A[i]);
      printf((firstout) ? "%"
                          "d"
                        : " %"
                          "d",
             (res)),
          firstout = 0;
    }
    printf("\n"), firstout = 1;
  }
  return 0;
}
