#include <bits/stdc++.h>
using namespace std;
int n;
int input[100005];
int dp[100005];
int min(int a, int b) {
  if (a < b) return a;
  return b;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> input[i];
  input[0] = -1000000000;
  dp[0] = 0;
  for (int i = 1; i <= n; i++) {
    int a = dp[i - 1] + 20;
    int b = dp[upper_bound(input, input + i, input[i] - 90) - input - 1] + 50;
    int c =
        dp[upper_bound(input, input + i, input[i] - 1440) - input - 1] + 120;
    dp[i] = min(min(a, b), c);
    cout << dp[i] - dp[i - 1] << '\n';
  }
  cout.flush();
  return 0;
}
