#include <bits/stdc++.h>
using namespace std;
const int D = 0;
const long long INF = 1e12;
long long n, l, l1;
vector<long long> ar, dp;
long long get(int p) {
  if (p < 0) {
    return 0;
  }
  return dp[p];
}
int main() {
  cin >> n;
  ar.resize(n + 10, 0);
  dp.resize(n + 10, INF);
  for (int i = 0; i < n; ++i) {
    cin >> ar[i];
  }
  dp[0] = 20;
  l = l1 = 0;
  for (int i = 1; i < n; ++i) {
    while (ar[i] - ar[l] >= 90) {
      ++l;
    }
    while (ar[i] - ar[l1] >= 1440) {
      ++l1;
    }
    dp[i] = dp[i - 1] + 20;
    dp[i] = min(dp[i], get(l - 1) + 50);
    dp[i] = min(dp[i], get(l1 - 1) + 120);
  }
  if (D) {
    for (int i = 0; i < n; ++i) {
      cout << dp[i] << " ";
    }
    cout << endl;
  }
  cout << dp[0] << endl;
  for (int i = 1; i < n; ++i) {
    cout << dp[i] - dp[i - 1] << endl;
  }
  return 0;
}
