Problem:


福縞軒

「福縞軒」は行列のできる人気のラーメン屋です。でも最近、お客さんの間から「待ち時間が長いのに、店に入ったら空席があるのは許せない」という声が聞こえるようになってきました。どうしてそんな不満が出るのか調べたいのですが、お店が開いているあいだは忙しくて、実際の行列の様子を調べることができません。しかし、長年の経験からお客さんが来る間隔や人数は分かっているので、それをもとに待ち時間の分析をすることにしました。

店内にはカウンターに向かって 17 の席があります。開店時間は正午で、お客さんは次のようにやってきます。

   
0 番から 99 番までの 100 組のグループが来ます。

   
i 番目のグループは正午から 5i 分後にお店に到着します。

   
i 番目のグループの人数は i % 5 が 1 のとき 5 人、それ以外のときは 2 人です。

   (x % yは x を y で割ったときの余りを表わします。)

   
i 番目のグループは、席に着くと 17(i % 2) + 3(i % 3) + 19 分間で食事を済ませます。

最初の 10 グループの到着時刻、人数、食事時間は次のようになります。

グループ番号
             0   1  2  3  4  5  6  7  8  9

到着時刻(分後)
             0 5 10 15 20 25 30 35 40 45

人数(人)
             2  5  2  2  2  2  5  2  2  2

食事時間(分)
             19 39 25 36 22 42 19 39 25 36

また、お客さんを席に案内するときには、次のようにしています。

    
席には 0 から 16 までの番号が付いています。

    
x 人のグループは連続して x 個あいている席があった時だけ着席できます。

また、座れる場所が複数あった場合は、席の番号が最も小さくなるところに座ります。例えば、0、1、2、4、5番の席だけが空いていた場合、5 人のグループは着席できません。2 人のグループであれば 0、1 番に着席します。

一度着席したら、席を移動してもらうことはしません。

お客さんは 1 分単位で出入りします。各時刻には次の順序でお客さんを案内します。

 
前のグループの離席と同時に次のグループの着席が可能となります。

 
お客さんを着席させる際には、行列の先頭にいるグループから順に、できる限り多くのグループを同じ時刻に着席させます。行列の順序を追い越すことはしません。つまり、先頭のグループが着席できなければ、行列内の他のグループが着席できたとしても、着席させません。

 
その時刻に到着したグループは、行列が残っている場合は行列の最後尾に並びます。行列が無く、着席できる場合は着席し、できない場合は並んで待ちます。例として最初の 10 グループが到着するまでの様子を示すと以下のようになります。各行の3つの欄は、左から時刻、座席の様子、行列の様子を示しています。座席は「_」が空席で、番号はその席にその番号のグループが座っていることを示しています。

時刻: 座席                  行列
0:    00_______________:
5:    0011111__________:
10:   001111122________:
15:   00111112233______:
18:   00111112233______:
19:   __111112233______:
20:   44111112233______:
25:   4411111223355____:
30:   4411111223355____:   66666       グループ6が到着
34:   4411111223355____:   66666
35:   4411111__3355____:   6666677     グループ7が到着
40:   4411111__3355____:   666667788   グループ8が到着
41:   4411111__3355____:   666667788
42:   __11111__3355____:   666667788
43:   __11111__3355____:   666667788
44:   6666677883355____:               グループ6、7、8が着席
45:   666667788335599__:               グループ9が到着、着席

例えば、時刻 40 では 8 番目のグループが到着しますが、着席できないので行列に加わります。4 番目のグループは時刻 41 まで食事をします。時刻 42 では、4 番目のグループの席が空きますが、連続した席数が足りないので 6 番目のグループはまだ着席できません。1 番目のグループは時刻 43 まで食事をします。時刻 44 で 1 番目のグループの席が空くので、6 番目のグループが着席し、同時に 7 番目、8 番目のグループも着席します。9 番目のグループは時刻 45 で到着し、席が空いているのでそのまま着席します。

これらの情報を基にして、0 以上 99 以下の整数 n を入力として、n 番目グループのお客さんが待つ時間(分単位)を出力するプログラムを作成してください。

Input

複数のデータセットが与えられます。各データセットは１つの整数 n からなります。

データセットの数は 20 を超えません。

Output

各データセットについて、n 番目のお客の分単位の待ち時間(0 以上の整数)を１行に出力してください。

Sample Input

5
6
7
8

Output for the Sample Input

0
14
9
4



Sample input:
5
6
7
8


Sample output:
0
14
9
4

Submission status: Wrong Answer

Solution code:
seat = [0]*17
time = [0]*99
queue = []
t = 0
while 1:
    if t < 5*99 and t%5 == 0:
        queue.append(t/5)
        
    sits = []
    for wait in queue:
        p = (2 if wait%5 != 1 else 5)
        for i in range(17-p):
            if seat[i:i+p].count(0) == p:
                seat[i:i+p] = [17*(wait%2)+3*(wait%3)+19]*p
                sits.append(wait)
                break
        else:
            break
    for sit in sits:
        queue.remove(sit)
    seat = [max(0,i-1) for i in seat]
    for wait in queue:
        time[wait] += 1
    t += 1
    if t > 5*99 and not queue: break

while 1:
    try:
        n = int(raw_input())
        print time[n]
    except:
        break

Submission status: Wrong Answer

Solution code:
seat = [0]*17
time = [0]*100
queue = []
t = 0
while 1:
    if t <= 5*99 and t%5 == 0:
        queue.append(t/5)
        
    sits = []
    for wait in queue:
        p = (2 if wait%5 != 1 else 5)
        for i in range(17-p):
            if seat[i:i+p].count(0) == p:
                seat[i:i+p] = [17*(wait%2)+3*(wait%3)+19]*p
                sits.append(wait)
                break
        else:
            break
    for sit in sits:
        queue.remove(sit)
    seat = [max(0,i-1) for i in seat]
    for wait in queue:
        time[wait] += 1
    t += 1
    if t > 5*99 and not queue: break

while 1:
    try:
        n = int(raw_input())
        print time[n]
    except:
        break

Submission status: Wrong Answer

Solution code:
R = range(100)
In = [i*5 for i in R]
Out = [-1] *100
Men = [[2, 5][(i % 5)==1] for i in R]
Pos = [-1]*100
Eat = [17*(i%2)+3*(i%3)+19 for i in R]
Seat = [-1]*17
QUE=[]
Wait = [0]*100

def stand(I, s):
  n = Men[I]
  Pos[I] = -1
  Seat[s:s+n] = [-1] * n
  Out[I] = -1
  return 1

def sit(I, s):
  n = Men[I]
  Pos[I] = s
  Seat[s:s+n] = [I] * n
  Out[I] = t + Eat[I]
  Wait[I] += t
  return

def check(I):
  n = Men[I]
  for s in range(17-n):
    if Seat[s:s+n] == [-1]*n: return s
  return -1

t = 0
c = 0
while c<100:
  while t in Out:
    I = Out.index(t)
    c += stand(I, Pos[I])

  while t in In:
    I = In.index(t)
    QUE.append(I)
    Wait[I] = -t
    In[I] = -1

  while len(QUE)>0:
    I = QUE[0]
    s = check(I)
    if s==-1: break
    sit(I, s)
    del QUE[0]
  t += 1

while 1:
  try: I=int(raw_input())
  except: break
  print Wait[I]

Submission status: Wrong Answer

Solution code:
R = range(100)
M = [[2,5,2,2,2][i%5] for i in R]
Out = [-1] *100
P = [-1]*100
S = [-1]*17
Q = []
W = [0]*100

def stand(I, s):
  n = M[I]
  P[I] = -1
  S[s:s+n] = [-1] * n
  Out[I] = -1
  return 1

def sit(I, s):
  n = M[I]
  P[I] = s
  S[s:s+n] = [I] * n
  Out[I] = t+ 17*(I%2)+3*(I%3)+19
  W[I] = t - I*5
  return

def check(I):
  n = M[I]
  for s in range(17-n):
    if S[s:s+n] == [-1]*n: return s
  return -1

t = 0
c = 0
while c<100:
  while t in Out:
    I = Out.index(t)
    c += stand(I, P[I])

  if t<500 and t%5==0: Q.append(t/5)
 
  while len(Q)>0:
    s = check(Q[0])
    if s==-1: break
    sit(Q.pop(0), s)
  t += 1

while 1:
  try: print W[int(raw_input())]
  except: break

Submission status: Accepted

Solution code:
seat = [0]*17
time = [0]*100
queue = []
t = 0
while 1:
    if t <= 5*99 and t%5 == 0:
        queue.append(t/5)
        
    sits = []
    for group in queue:
        p = (2 if group%5 != 1 else 5)
        for j in range(17-p+1):
            if seat[j:j+p].count(0) == p:
                seat[j:j+p] = [17*(group%2)+3*(group%3)+19]*p
                sits.append(group)
                break
        else:
            break
    for sit in sits:
        queue.remove(sit)
        
    seat = [max(0,i-1) for i in seat]
    for group in queue:
        time[group] += 1
    t += 1
    if t > 5*99 and not queue: break

while 1:
    try:
        n = int(raw_input())
        print time[n]
    except:
        break

Submission status: Accepted

Solution code:
seat = [0]*17
wait = [0]*100
queue = []
t = 0
while 1:
    if t <= 5*99 and t%5 == 0:
        queue.append(t/5)
        
    newqueue = queue[:]
    for group in queue:
        p = (2 if group%5 != 1 else 5)
        for j in range(17-p+1):
            if seat[j:j+p] == [0]*p:
                seat[j:j+p] = [17*(group%2)+3*(group%3)+19]*p
                newqueue.remove(group)
                break
        else:
            break
    queue = newqueue[:]
    seat = [max(0,i-1) for i in seat]
    for group in queue:
        wait[group] += 1
    t += 1
    if t > 5*99 and not queue: break

while 1:
    try:
        print wait[int(raw_input())]
    except:
        break

Submission status: Accepted

Solution code:
R = range(100)
M = [[2,5,2,2,2][i%5] for i in R]
Out = [-1] *100
P = [-1]*100
S = [-1]*17
Q = []
W = [0]*100

def stand(I, s):
  n = M[I]
  P[I] = -1
  S[s:s+n] = [-1] * n
  Out[I] = -1
  return 1

def sit(I, s):
  n = M[I]
  P[I] = s
  S[s:s+n] = [I] * n
  Out[I] = t+ 17*(I%2)+3*(I%3)+19
  W[I] = t - I*5
  return

def check(I):
  n = M[I]
  for s in range(17-n+1):
    if S[s:s+n] == [-1]*n: return s
  return -1

t = 0
c = 0
while c<100:
  while t in Out:
    I = Out.index(t)
    c += stand(I, P[I])

  if t<500 and t%5==0: Q.append(t/5)
 
  while len(Q)>0:
    s = check(Q[0])
    if s==-1: break
    sit(Q.pop(0), s)
  t += 1

while 1:
  try: print W[int(raw_input())]
  except: break

Submission status: Accepted

Solution code:
S = [0]*17
Q = []
W = [0]*100
 
def check(I):
  n = [2,5][I%5==1]
  for s in range(17-n+1):
    if S[s:s+n] == [0]*n: return s
  return -1

t = 0
c = 0
while c<100:
  for i in range(S.count(t)): S[S.index(t)]=0
  if t<500 and t%5==0: Q.append(t/5)
  
  while len(Q)>0:
    s = check(Q[0])
    if s==-1: break
    I = Q.pop(0)
    n = [2,5][I%5==1]
    S[s:s+n] = [t+ 17*(I%2) + 3*(I%3) + 19] * n
    W[I] = t - I*5
    c += 1
  t += 1
 
while 1:
  try: print W[int(raw_input())]
  except: break

Submission status: Accepted

Solution code:
def et():
    lis = []
    for n in eat:
        eat[n] = eat[n]-1
        if eat[n] == 0:
            ct(n)
            lis.append(n)
    for n in lis:
        del eat[n]
        
def ct(n):
    for i, s in enumerate(counter):
        if s == n:
            counter[i] = '_'
            
def wt():
    for n in wait:
        wait[n] = wait[n]+1
        
def ck(n, w):
    c = 5 if n%5 == 1 else 2
    for i, s in enumerate(counter):
        if s == '_':
            if counter[i:i+c] == ['_']*c:
                for i in range(i,i+c):
                    counter[i] = n
                else:
                    res[n] = w
                    return True
    
res = {}       
procession = []
wait = {}
eat = {}
counter = ['_' for i in range(17)]
t = 0
while True:
    et()
    wt()
    if procession:
        for n in procession[:]:
            if ck(n, wait[n]):
                del wait[n]
                del procession[0]
                eat[n] = 17*(n%2)+3* (n%3)+19
            else:
                break
    if len(res) == 100:
        break
    if t <= 495:
        if t%5 == 0:
            n = t/5
            if not procession and ck(n, 0):
                eat[n] = 17*(n%2)+3* (n%3)+19
            else:
                procession.append(n)
                wait[n] = 0
    t += 1
    
while True:
    try:
        print res[input()]
    except EOFError:
        break

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0147

"""
import sys
from sys import stdin
from heapq import heappop, heappush
from collections import deque
input = stdin.readline


class Seat():
    def __init__(self, n):
        self.seat = '_' * n

    def get(self, num):
        i = self.seat.find('_'*num)
        if i != -1:
            self.seat = self.seat[0:i] + 'o'*num + self.seat[i+num:]
            return i
        return None

    def release(self, i, num):
        self.seat = self.seat[0:i] + '_'*num + self.seat[i+num:]


def solve():
    waiting_time = [-1] * 100
    NUM_OF_SEAT = 17
    seat = Seat(NUM_OF_SEAT)
    LEAVE = 0
    COME = 1
    in_out = []                 #  ??\?????????????????????????????????
    Q = deque()                      #  ??§??????????????????
    # 100???????????\????????????????????????
    for group_id in range(100):
        if group_id % 5 == 1:
            num = 5
        else:
            num = 2
        heappush(in_out, (group_id * 5, COME, NUM_OF_SEAT+1, group_id, num))

    while in_out:
        time, event, start_seat, group_id, num = heappop(in_out)
        if event == COME:
            Q.append((time, group_id, num))
        else:
            seat.release(start_seat, num)
        while Q:
            res = seat.get(Q[0][2])
            if res is not None:
                arrive, group_id, num = Q.popleft()
                waiting_time[group_id] = time - arrive
                eating_time = 17 * (group_id % 2) + 3*(group_id % 3) + 19
                heappush(in_out, (time + eating_time, LEAVE, res, group_id, num))
            else:
                break
    return waiting_time


def main(args):
    waiting_time = solve()

    for line in sys.stdin:
        print(waiting_time[int(line)])


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0147

"""
import sys
from sys import stdin
from heapq import heappop, heappush
from collections import deque
input = stdin.readline


class Seat():
    # ??????????????¶???????????????????????????
    # '_'?????????????????????'o'???????????§??£??????????????????
    def __init__(self, n):
        self.seat = '_' * n

    def get(self, num):
        # num????????£?¶?????????§???????????????????????°?????§???????????????????????????????????????????????????????????????????????°-1????????????
        i = self.seat.find('_'*num)
        if i != -1:
            self.seat = self.seat[0:i] + 'o'*num + self.seat[i+num:]
            return i
        return -1

    def release(self, i, num):
        # ??§??£???????????????????????????????????????????????????????????????????????????????????´??§???????????????
        self.seat = self.seat[0:i] + '_'*num + self.seat[i+num:]


def solve():
    waiting_time = [-1] * 100   #  ?????°??????????????¨???????????????
    NUM_OF_SEAT = 17
    seat = Seat(NUM_OF_SEAT)    #  ???????????¶????????????????????????????????????
    LEAVE = 0                   #  ??\???????£???????????????????????????????????????\
    COME = 1                    #  LEAVE??¨COME??????????????????????????´????????????????????\?????§LEAVE????????????????????????????????????????????´???????????????
    in_out = []                 #  ??\?????????????????????????????????
    Q = deque()                      #  ??§??????????????????
    # 100???????????\????????????????????????
    for group_id in range(100):
        if group_id % 5 == 1:
            num = 5
        else:
            num = 2
        heappush(in_out, (group_id * 5, COME, NUM_OF_SEAT+1, group_id, num)) #  ????????????????????????????????????????¨?????????????????????´????????????????????????????????°????????????????????\????????°

    # ???????????\??????????????????????????????????????????????????????
    while in_out:
        time, event, start_seat, group_id, num = heappop(in_out)
        if event == COME:
            Q.append((time, group_id, num)) #  ??\????????´???????????¢????????£?????????????????§??????????????§??????????????§?????????
        else:
            seat.release(start_seat, num) #  ?£???????????????????????????????
        while Q:                #  ?????£???????????°??????????????§?????????????????§????????????
            res = seat.get(Q[0][2]) #  ?????????????????????????????§????????????
            if res != -1:
                arrive, group_id, num = Q.popleft()
                waiting_time[group_id] = time - arrive #  ????????°?????????????????\?????????????????§???????????§????????????????¨????
                eating_time = 17 * (group_id % 2) + 3*(group_id % 3) + 19 #  ?£??????????
                heappush(in_out, (time + eating_time, LEAVE, res, group_id, num)) #  ?????????????????????????????¨???????????????????????????
            else:
                break           #  ??????????????????????????°??????????????§???????????£????????§????¬??????°?????????????¢??????????
    return waiting_time         #  ??¨??°??????????????????????????????


def main(args):
    waiting_time = solve()

    for line in sys.stdin:
        print(waiting_time[int(line)])


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

Solution code:
# AOJ 0147 Fukushimaken
# Python3 2018.6.23 bal4u
# キューで待ち行列

S = 17
seat = [[0 for t in range(27)] for id in range(27)]
ans = [0]*105
id = 0
Q = []
for i in range(S): seat[i][0] = -1
t = -1
while ans[99] == 0:
	t += 1
	# グループ到着
	if t % 5 == 0 and id <= 99:
		n = 5 if (id % 5) == 1 else 2
		Q.append((id, n, t))
		id += 1

	# 食事時間の確認
	for i in range(S):
		if seat[i][1] == 0: continue
		seat[i][1] -= 1
		if seat[i][1] == 0: seat[i][0] = -1

	# 待ち行列の案内
	f = len(Q)
	while f > 0:
		i, n = Q[0][0], Q[0][1]
		f = 0;
		for j in range(S):
			g = 0
			for k in range(n):
				if seat[j+k][0] >= 0:
					g = 1
					break
			if g: continue
			ans[i] = t-Q[0][2]
			del Q[0]
			f = len(Q)
			for k in range(n):
				seat[j+k][0] = i
				seat[j+k][1] = 17*(i&1) + 3*(i%3) + 19
			break

while 1:
	try: n = int(input())
	except: break	
	print(ans[n])

Submission status: Accepted

Solution code:
#Fukushimaken: 
from heapq import heappop, heappush
OUT, IN = 0, 1
def P(i):
    return 31 if i % 5 == 1 else 3

def M(i):
    return 17 * (i % 2) + 3 * (i % 3) + 19

def check(c, n):
    for i in xrange(16):
        if (c >> i) & n == 0:
            return i
    return None

ans = [-1] * 100 + [0]
eq = map(lambda i: (i * 5, i, IN, None), xrange(100))
c = 1 << 17
while len(eq) != 0:    
    m, n, et, i = heappop(eq)
    if et == IN:        
        p = P(n)
        i = check(c, p)
        if ans[n-1] != -1 and i is not None:
            c = c | (p << i)
            ans[n] = m - n * 5
            heappush(eq, (m + M(n), n, OUT, i))
        else:
            heappush(eq, (m + 1, n, IN, None)) #
    else:        
        p = P(n)
        c = c ^ (p << i)

while True:
    try:
        n = input()
        print ans[n]
    except:
        break

Submission status: Accepted

Solution code:
#Fukushimaken: 
from heapq import heappop, heappush
OUT, IN = 0, 1
def P(i):
    return 31 if i % 5 == 1 else 3

def M(i):
    return 17 * (i % 2) + 3 * (i % 3) + 19

def check(c, n):
    for i in xrange(16):
        if (c >> i) & n == 0:
            return i
    return None

ans = [-1] * 100 + [0]
eq = map(lambda i: (i * 5, i, IN, None, P(i)), xrange(100))
c = 1 << 17
while len(eq) != 0:    
    m, n, et, i, p = heappop(eq)
    if et == IN:        
        i = check(c, p)
        if ans[n-1] != -1 and i is not None:
            c = c | (p << i)
            ans[n] = m - n * 5
            heappush(eq, (m + M(n), n, OUT, i, p))
        else:
            heappush(eq, (m + 1, n, IN, None, p)) #
    else:        
        c = c ^ (p << i)

while True:
    try:
        n = input()
        print ans[n]
    except:
        break

Submission status: Accepted

Solution code:
#Fukushimaken: 
from heapq import heappop, heappush
def P(i):
    return 31 if i % 5 == 1 else 3

def M(i):
    return 17 * (i % 2) + 3 * (i % 3) + 19

def check(c, n):
    for i in xrange(16):
        if (c >> i) & n == 0:
            return i
    return None

ans = [-1] * 100 + [0]
eq = map(lambda i: (i * 5, i, None, P(i)), xrange(100))
c = 1 << 17
while len(eq) != 0:    
    m, n, i, p = heappop(eq)
    if i is None:        
        i = check(c, p)
        if ans[n-1] != -1 and i is not None:
            c = c | (p << i)
            ans[n] = m - n * 5
            heappush(eq, (m + M(n), n, i, p))
        else:
            heappush(eq, (m + 1, n, None, p)) #
    else:        
        c = c ^ (p << i)

while True:
    try:
        print ans[input()]
    except:
        break

Submission status: Accepted

Solution code:
from collections import deque

que = deque()
t = 0
seat = [0] * 17
score = []
while que or t < 500:
  if t % 5 == 0 and t < 500:
    i = t // 5
    que.append([t, 5 if i % 5 == 1 else 2, 17 * (i % 2) + 3 * (i % 3) + 19])
  
  for i in range(17):
    if seat[i]:
      seat[i] -= 1

  while que:
    need_space = que[0][1]
    for i in range(18 - need_space):
      if not any(seat[i:i+need_space]):
        for j in range(i, i + need_space):
          seat[j] = que[0][2]
        score.append(t - que[0][0])
        que.popleft()
        break
    else:
      break
  t += 1

while True:
  try:
    print(score[int(input())])
  except EOFError:
    break

Submission status: Accepted

Solution code:
from collections import deque
from heapq import heappush, heappop
que = deque()
q = []
N = 100
for i in range(N):
    heappush(q, (5*i, 0, i))
M = 17
S = [-1]*M
T = [0]*N
while q:
    t = None
    while q and (t is None or q[0][0] == t):
        t, c, i = heappop(q)
        if c == 0:
            que.append(i)
        else:
            for j in range(M):
                if S[j] == i:
                    S[j] = -1

    while que:
        i = que[0]
        m = 5 if i % 5 == 1 else 2

        cnt = 0; j = -1
        for k in range(M):
            if S[k] == -1:
                cnt += 1
                if cnt == m:
                    j = k-m+1
                    break
            else:
                cnt = 0
        if j == -1:
            break
        for k in range(m):
            S[j + k] = i
        T[i] = t - 5*i
        que.popleft()
        heappush(q, (t + (17*(i%2) + 3*(i%3) + 19), 1, i))
open(1, 'w').writelines(["{}\n".format(T[v]) for v in map(int, open(0).read().split())])

Submission status: Runtime Error

Solution code:
R = range(100)
M = [[2,5,2,2,2][i%5] for i in R]
Out = [-1] *100
P = [-1]*100
S = [-1]*17
Q = []
W = [0]*100

def stand(I, s):
  n = M[I]
  P[I] = -1
  S[s:s+n] = [-1] * n
  Out[I] = -1
  return 1

def sit(I, s):
  n = M[I]
  P[I] = s
  S[s:s+n] = [I] * n
  Out.[I] = t+ 17*(I%2)+3*(I%3)+19
  W[I] = t - I*5
  return

def check(I):
  n = M[I]
  for s in range(17-n):
    if S[s:s+n] == [-1]*n: return s
  return -1

t = 0
c = 0
while t<100:
  while t in Out:
    I = Out.index(t)
    c += stand(I, P[I])

  if t<500 and t%5==0: Q.append(t/5)
 
  while len(Q)>0:
    s = check(Q[0])
    if s==-1: break
    sit(Q.pop(0), s)
  t += 1

while 1:
  try: print W[int(raw_input())]
  except: break