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