#include <bits/stdc++.h>
using namespace std;
int a[1000000], dp[1000000];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= n; i++) {
    long temp1 = max(0, a[i] - 89), temp2 = max(0, a[i] - 1439);
    int sol = lower_bound(a + 1, a + 1 + n, temp1) - a;
    int ans = lower_bound(a + 1, a + 1 + n, temp2) - a;
    sol--, ans--;
    dp[i] = min(dp[i - 1] + 20, min(dp[sol] + 50, dp[ans] + 120));
    cout << dp[i] - dp[i - 1] << endl;
  }
}
