#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 1;
const int M = 1e9 + 7;
const double eps = 1e-6;
const double PI(acos(-1.0));
int n;
int f[N];
int a[N];
int main() {
  cin >> n;
  for (int i = (1); i <= (n); i++) {
    cin >> a[i];
    f[i] = f[i - 1] + 20;
    int pos = lower_bound(a + 1, a + i, a[i] - 89) - a;
    f[i] = min(f[i], f[pos - 1] + 50);
    pos = upper_bound(a + 1, a + 1 + i, a[i] - 1440) - a;
    f[i] = min(f[i], f[pos - 1] + 120);
    cout << f[i] - f[i - 1] << '\n';
  }
}
