#include <bits/stdc++.h>
using namespace std;
int x[] = {1, -1, 0, 0};
int y[] = {0, 0, 1, -1};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  vector<int> dp(n + 1, 0);
  vector<int> v;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    v.push_back(a);
  }
  for (int i = 1; i <= n; i++) {
    int l = upper_bound(v.begin(), v.end(), v[i - 1] - 90) - v.begin();
    int r = upper_bound(v.begin(), v.end(), v[i - 1] - 1440) - v.begin();
    dp[i] = dp[i - 1] + 20;
    dp[i] = min(dp[l] + 50, dp[i]);
    dp[i] = min(dp[r] + 120, dp[i]);
  }
  for (int i = 1; i <= n; i++) {
    cout << dp[i] - dp[i - 1] << endl;
  }
}
