#include <bits/stdc++.h>
using namespace std;
vector<int> arr;
int n;
vector<int> ans;
const int N = 100005;
long long dp[N];
long long cal(int ind) {
  if (ind <= 0) return 0;
  long long ans = LLONG_MAX, temp;
  if (dp[ind] != -1) return dp[ind];
  ans = 20 + cal(ind - 1);
  ans = min(ans, 50 + cal(upper_bound(arr.begin(), arr.end(), arr[ind] - 90) -
                          arr.begin() - 1));
  ans =
      min(ans, 120 + cal(upper_bound(arr.begin(), arr.end(), arr[ind] - 1440) -
                         arr.begin() - 1));
  dp[ind] = ans;
  return ans;
}
int main() {
  cin >> n;
  arr.resize(n + 1, 0);
  ans.resize(n + 4, 0);
  for (int i = 1; i <= n; ++i) cin >> arr[i];
  memset(dp, -1, sizeof(dp));
  dp[0] = 0;
  long long lalla = cal(n);
  for (int i = 1; i <= n; ++i) {
    cout << dp[i] - dp[i - 1] << endl;
  }
  return 0;
}
