#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 10;
long long n, s, t;
long long a[N], b[N], d[N];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= n; i++) {
    d[i] = d[i - 1] + 20;
    long long l = 0, r = i;
    while (r - l > 1) {
      int mid = (l + r) >> 1;
      if (a[i] + 1 - a[mid] <= 90)
        r = mid;
      else {
        l = mid;
      }
    }
    if (a[i] + 1 - a[l] <= 90) r = l;
    if (a[i] + 1 - a[r] <= 90) {
      d[i] = min(d[i], d[r - 1] + 50);
    }
    l = 0, r = i;
    while (r - l > 1) {
      int mid = (l + r) >> 1;
      if (a[i] + 1 - a[mid] <= 1440)
        r = mid;
      else {
        l = mid;
      }
    }
    if (a[i] + 1 - a[l] <= 1440) r = l;
    if (a[i] + 1 - a[r] <= 1440) {
      d[i] = min(d[i], d[r - 1] + 120);
    }
  }
  for (int i = 1; i <= n; i++) {
    cout << d[i] - d[i - 1] << '\n';
  }
}
