#include <bits/stdc++.h>
using namespace std;
const int s = 100002;
int dp[s];
int y[s];
set<pair<int, int> > st;
set<pair<int, int> >::iterator it;
int main() {
  int n, m;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> y[i];
    st.insert(make_pair(y[i], i));
  }
  dp[0] = 0;
  dp[1] = 20;
  cout << 20 << endl;
  int sh = 20;
  for (int i = 2; i <= n; i++) {
    dp[i] = dp[i - 1] + 20;
    it = st.lower_bound(make_pair(y[i] - 89, 0));
    m = (*it).second;
    m--;
    dp[i] = min(dp[i], dp[m] + 50);
    it = st.lower_bound(make_pair(y[i] - 1439, 0));
    m = (*it).second;
    m--;
    dp[i] = min(dp[i], dp[m] + 120);
    cout << max(0, dp[i] - sh) << endl;
    sh += max(0, dp[i] - sh);
  }
}
