#include <bits/stdc++.h>
using namespace std;
int n, i, m1, m2, t[100004], p[100004], st, dr, m;
int main() {
  scanf("%d", &n);
  p[0] = 0;
  for (i = 1; i <= n; i++) {
    scanf("%d", &t[i]);
    p[i] = p[i - 1] + 20;
    m1 = t[i] - 89;
    if (m1 <= 0)
      m2 = 50;
    else {
      st = 1;
      dr = i - 1;
      while (st <= dr) {
        m = (st + dr) / 2;
        if (t[m] >= m1)
          dr = m - 1;
        else
          st = m + 1;
      }
      m2 = p[dr] + 50;
    }
    if (m2 < p[i]) p[i] = m2;
    m1 = t[i] - 1439;
    if (m1 <= 0)
      m2 = 120;
    else {
      st = 1;
      dr = i - 1;
      while (st <= dr) {
        m = (st + dr) / 2;
        if (t[m] >= m1)
          dr = m - 1;
        else
          st = m + 1;
      }
      m2 = p[dr] + 120;
    }
    if (m2 < p[i]) p[i] = m2;
    printf("%d\n", (p[i] - p[i - 1]));
  }
  return 0;
}
