#include <bits/stdc++.h>
using namespace std;
int n;
int a[100005];
int v[100005];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= n; i++) {
    int t = lower_bound(a + 1, a + 1 + n, a[i] - 89) - a;
    int sum = 0;
    for (int j = t; j < i; j++) {
      sum += v[j];
    }
    int x = max(0, 50 - sum);
    sum = 0;
    t = lower_bound(a + 1, a + 1 + n, a[i] - 1439) - a;
    for (int j = t; j < i; j++) {
      sum += v[j];
    }
    int y = max(0, 120 - sum);
    v[i] = min(min(x, y), 20);
  }
  for (int i = 1; i <= n; i++) {
    cout << v[i] << endl;
  }
  return 0;
}
