#include <bits/stdc++.h>
using namespace std;
long long n, p9, p12;
long long t[100005], f[100005];
inline long long read() {
  long long x = 0, f = 1;
  char c = getchar();
  while (c > '9' || c < '0') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return x * f;
}
int main() {
  n = read();
  for (int i = 1; i <= n; i++) {
    t[i] = read();
  }
  f[1] = 20;
  for (int i = 2; i <= n; i++) {
    while (t[p9] + 89 < t[i]) p9++;
    while (t[p12] + 1439 < t[i]) p12++;
    f[i] = min(f[i - 1] + 20, min(f[p9 - 1] + 50, f[p12 - 1] + 120));
  }
  for (int i = 1; i <= n; i++) {
    cout << f[i] - f[i - 1] << endl;
  }
  return 0;
}
