#include <bits/stdc++.h>
using namespace std;
const long double PI = acos(-1.0);
const int MAXN = 200001;
int t[MAXN];
int f[MAXN];
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  f[0] = 0;
  for (int i = 0; i < n; i++) {
    cin >> t[i];
    f[i + 1] = f[i] + 20;
    f[i + 1] = min(f[i + 1], f[upper_bound(t, t + i, t[i] - 90) - t] + 50);
    f[i + 1] = min(f[i + 1], f[upper_bound(t, t + i, t[i] - 1440) - t] + 120);
  }
  for (int i = 0; i < n; i++) cout << f[i + 1] - f[i] << "\n";
  return 0;
}
