#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
const int N = 1e12;
long long int a[maxn];
long long int dp[maxn];
int main() {
  long long int n, i, index1 = 1, index2 = 1;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
    if (i == 1) {
      dp[i] = 20;
      continue;
    }
    dp[i] = dp[i - 1] + 20;
    while (a[index1] + 90 <= a[i]) index1++;
    while (a[index2] + 1440 <= a[i]) index2++;
    dp[i] = min(dp[i], dp[index1 - 1] + 50);
    dp[i] = min(dp[i], dp[index2 - 1] + 120);
  }
  for (i = 1; i <= n; i++) cout << dp[i] - dp[i - 1] << endl;
  return 0;
}
