#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, a[100050], dp[100050];
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  a[0] = 0;
  dp[0] = 0;
  for (int i = 1; i <= n; i++) {
    long long up = upper_bound(a, a + n + 1, a[i] - 1) - a - 1;
    dp[i] = dp[up] + 20;
    up = upper_bound(a, a + n + 1, a[i] - 90) - a - 1;
    dp[i] = min(dp[i], dp[up] + 50);
    up = upper_bound(a, a + n + 1, a[i] - 1440) - a - 1;
    dp[i] = min(dp[i], dp[up] + 120);
  }
  for (int i = 1; i <= n; i++) {
    cout << dp[i] - dp[i - 1] << endl;
  }
}
