#include<stdio.h>#include<string.h>#include<iostream>using namespace std;struct device{ int consume; int clicktimes;};int main(){ device a[20]; int n, m, c; int b; int max = 0; int current = 0; int count = 0; while ( cin >> n >> m >> c && !(n==0 && m==0 && c==0)) { for (int i = 0; i < n; i++) { cin >> a[i].consume; a[i].clicktimes = 0; } for (int j = 0; j < m; j++) { cin >> b; (a[b-1]).clicktimes++; if (a[b-1].clicktimes % 2 == 1) current += a[b-1].consume; else current -= a[b-1].consume; if (max < current) max = current; } if (max <= c) { printf("Sequence %dnFuse was not blown.nMaximal power consumption was %d amperes.nn", ++count, max); } else printf("Sequence %dnFuse was blown.nn", ++count); max = current = 0; } return 0;}