#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int a[N], n;
int dp[N];
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
  }
  for (int i = 1; i <= n; ++i) {
    dp[i] = dp[i - 1] + 20;
    for (int j = i - 1; j > 0; j--) {
      if (a[i] - a[j] < 90)
        dp[i] = min(dp[i], dp[j - 1] + 50);
      else if (a[i] - a[j] < 1440)
        dp[i] = min(dp[i], dp[j - 1] + 120);
      else
        break;
    }
    cout << dp[i] - dp[i - 1] << endl;
  }
  return 0;
}
