#include <bits/stdc++.h>
using namespace std;
long long int MIN(long long int x, long long int y) {
  if (x < y) return x;
  return y;
}
int main() {
  int n;
  cin >> n;
  vector<int> v1;
  long long int a[n + 1];
  v1.push_back(-1441);
  for (int i = 0; i < n; ++i) {
    int x;
    cin >> x;
    v1.push_back(x);
  }
  a[0] = 0;
  for (int i = 1; i <= n; ++i) {
    int r = v1[i];
    long long int min1;
    auto it = lower_bound(v1.begin(), v1.end(), r - 89),
         it1 = lower_bound(v1.begin(), v1.end(), r - 1439);
    int y = it - v1.begin() - 1, z = it1 - v1.begin() - 1;
    min1 = a[y] + 50;
    min1 = MIN(min1, a[z] + 120);
    min1 = MIN(min1, a[i - 1] + 20);
    a[i] = min1;
  }
  for (int i = 1; i <= n; ++i) cout << a[i] - a[i - 1] << "\n";
}
