using System.Collections.Generic;
private int[] Elements = new int[1];
Array.Resize(ref this.Elements, n);
if (this.top > -1) return true;
Array.Resize(ref this.Elements, n);
this.Elements[++top] = x;
if (top == -1) throw new Exception("Error");
if (top == -1) throw new Exception("Error");
public static void Main(string[] args)
expr = Console.ReadLine();
Console.WriteLine("Nepravilen");
for(i=1; i<expr.Length; i++)
if (expr[i] == '{') myStack.Push(expr[i]);
if (myStack.Peek() =='{')
Console.WriteLine("Nepravilen");
catch (InvalidOperationException)
Console.WriteLine("Nepravilen");
catch(InvalidOperationException)
Console.WriteLine("Pravilen");
Console.WriteLine("Pravilen");