#include <bits/stdc++.h>
using namespace std;
int n;
long long num[100010];
int dp[100010];
int main() {
  num[0] = 0;
  cin.sync_with_stdio(false);
  while (cin >> n) {
    for (int i = 1; i <= n; i++) {
      cin >> num[i];
    }
    dp[0] = 0;
    for (int i = 1; i <= n; i++) {
      dp[i] = dp[i - 1] + 20;
      for (int j = i - 1; j > 0; j--) {
        if (num[i] - num[j] < 90) {
          dp[i] = min(dp[i], dp[j - 1] + 50);
        } else if (num[i] - num[j] < 1440) {
          dp[i] = min(dp[i], dp[j - 1] + 120);
        } else {
          break;
        }
      }
      cout << dp[i] - dp[i - 1] << endl;
    }
  }
  return 0;
}
