#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<long long int> jobs(n);
  for (int i = 0; i < n; i++) cin >> jobs[i];
  vector<long long int> ans(n);
  ans[0] = 20;
  cout << 20 << endl;
  for (int i = 1; i < n; i++) {
    long long int a, b, c;
    a = ans[i - 1] + 20;
    long long int last90 = jobs[i] - 90;
    int ind =
        upper_bound(jobs.begin(), jobs.begin() + i, last90) - jobs.begin();
    if (ind != 0)
      b = ans[ind - 1] + 50;
    else
      b = 50;
    long long int last1440 = jobs[i] - 1440;
    ind = upper_bound(jobs.begin(), jobs.begin() + i, last1440) - jobs.begin();
    if (ind != 0)
      c = ans[ind - 1] + 120;
    else
      c = 120;
    ans[i] = min(a, min(b, c));
    cout << (ans[i] - ans[i - 1]) << endl;
  }
  return 0;
}
