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