import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner();
        PrintWriter pw = new PrintWriter(System.out);
        int n = Integer.parseInt(sc.next());
        String cad = sc.next();
        char mayor = 0;
        boolean rta = false;
        for (int i = 0; i < n - 1; i++) {
            if (cad.charAt(i) > cad.charAt(i + 1)) {
                mayor = cad.charAt(i);
                rta = true;
                break;
            }
        }
        if (rta) {
            System.out.println(cad.replaceFirst(String.valueOf(mayor), ""));
        } else {
            System.out.println(cad.replaceFirst(String.valueOf(cad.charAt(0)), ""));
        }

    }

    static class Scanner {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");
        int spaces = 0;

        public String nextLine() throws IOException {
            if (spaces-- > 0) {
                return "";
            } else if (st.hasMoreTokens()) {
                return new StringBuilder(st.nextToken("\n")).toString();
            }
            return br.readLine();
        }

        public String next() throws IOException {
            spaces = 0;
            while (!st.hasMoreTokens()) {
                st = new StringTokenizer(br.readLine());
            }
            return st.nextToken();
        }

        public boolean hasNext() throws IOException {
            while (!st.hasMoreTokens()) {
                String line = br.readLine();
                if (line == null) {
                    return false;
                }
                if (line.equals("")) {
                    spaces = Math.max(spaces, 0) + 1;
                }
                st = new StringTokenizer(line);
            }
            return true;
        }
    }
}


import java.util.*;

public class Main {

    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        String s = sc.next();
        TreeSet set = new TreeSet();
        for (int i = 0; i < s.length(); i++) {
            set.add(s.charAt(i));
        }
        boolean cond = false;
        if (set.size() == 1) {
            System.out.println(s.substring(0, s.length() -1));
        } else {
            for (int i = 0; i < s.length(); i++) {
                if (s.charAt(i) != (char) set.last()) {
                    System.out.print(s.charAt(i));
                }
            }
            System.out.println();
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    public static  void main (String[] args) {

        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        try {
            int n = Integer.parseInt(reader.readLine());
            String s = reader.readLine();

            if(n == 1) {
                System.out.println(s);
                return;
            }

            int index = n-1;
            for(int i=0;i<n-1;i++) {
                char c = s.charAt(i);
                char a = s.charAt(i+1);
                if(a <= c) {
                    index = i;
                    break;
                }
            }

            System.out.println(s.substring(0,index)+s.substring(index+1,n));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    public static  void main (String[] args) {

        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        try {
            int n = Integer.parseInt(reader.readLine());
            String s = reader.readLine();

            if(n == 1) {
                System.out.println(s);
                return;
            }

            int index = n-1;
            for(int i=0;i<n-1;i++) {
                char c = s.charAt(i);
                char a = s.charAt(i+1);
                if(a < c) {
                    index = i;
                    break;
                }
            }

            System.out.println(s.substring(0,index)+s.substring(index+1,n));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    public static  void main (String[] args) {

        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        try {
            int n = Integer.parseInt(reader.readLine());
            String s = reader.readLine();

            if(n == 1) {
                System.out.println(s);
                return;
            }

            int maxValue = -1;
            int index = -1;
            for(int i=n-1;i>=0;i--) {
                char c = s.charAt(i);
                if(c > maxValue) {
                    maxValue = c;
                    index = i;
                }
            }

            System.out.println(s.substring(0,index)+s.substring(index+1,n));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Pranay2516
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, FastReader in, PrintWriter out) {
            int n = in.nextInt(), ind = 0;
            char c[] = in.next().toCharArray();
            for (int i = 0; i < n - 1; ++i) {
                if (c[i + 1] < c[i]) {
                    ind = i;
                }
            }
            //out.println(ind);
            for (int i = 0; i < n; ++i) if (i != ind) out.print(c[i]);
        }

    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private FastReader.SpaceCharFilter filter;

        public FastReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {

            if (numChars == -1)
                throw new InputMismatchException();

            if (curChar >= numChars) {

                curChar = 0;

                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }

                if (numChars <= 0)
                    return -1;
            }

            return buf[curChar++];
        }

        public int nextInt() {

            int c = read();

            while (isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-') {
                sgn = -1;
                c = read();
            }

            int res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();

                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public String next() {

            int c = read();

            while (isSpaceChar(c))
                c = read();

            StringBuilder res = new StringBuilder();

            do {
                res.appendCodePoint(c);
                c = read();
            }
            while (!isSpaceChar(c));

            return res.toString();
        }

        public boolean isSpaceChar(int c) {

            if (filter != null)
                return filter.isSpaceChar(c);

            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Pranay2516
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, FastReader in, PrintWriter out) {
            int n = in.nextInt(), ind = 0;
            char c[] = in.next().toCharArray();
            for (int i = 0; i < n - 1; ++i) {
                if (c[i + 1] < c[i]) {
                    ind = i;
                    break;
                }
            }
            //out.println(ind);
            for (int i = 0; i < n; ++i) if (i != ind) out.print(c[i]);
        }

    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private FastReader.SpaceCharFilter filter;

        public FastReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {

            if (numChars == -1)
                throw new InputMismatchException();

            if (curChar >= numChars) {

                curChar = 0;

                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }

                if (numChars <= 0)
                    return -1;
            }

            return buf[curChar++];
        }

        public int nextInt() {

            int c = read();

            while (isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-') {
                sgn = -1;
                c = read();
            }

            int res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();

                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public String next() {

            int c = read();

            while (isSpaceChar(c))
                c = read();

            StringBuilder res = new StringBuilder();

            do {
                res.appendCodePoint(c);
                c = read();
            }
            while (!isSpaceChar(c));

            return res.toString();
        }

        public boolean isSpaceChar(int c) {

            if (filter != null)
                return filter.isSpaceChar(c);

            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Pranay2516
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, FastReader in, PrintWriter out) {
            int n = in.nextInt(), ind = n - 1;
            char c[] = in.next().toCharArray();
            for (int i = 0; i < n - 1; ++i) {
                if (c[i + 1] < c[i]) {
                    ind = i;
                    break;
                }
            }
            //out.println(ind);
            for (int i = 0; i < n; ++i) if (i != ind) out.print(c[i]);
        }

    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private FastReader.SpaceCharFilter filter;

        public FastReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {

            if (numChars == -1)
                throw new InputMismatchException();

            if (curChar >= numChars) {

                curChar = 0;

                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }

                if (numChars <= 0)
                    return -1;
            }

            return buf[curChar++];
        }

        public int nextInt() {

            int c = read();

            while (isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-') {
                sgn = -1;
                c = read();
            }

            int res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();

                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public String next() {

            int c = read();

            while (isSpaceChar(c))
                c = read();

            StringBuilder res = new StringBuilder();

            do {
                res.appendCodePoint(c);
                c = read();
            }
            while (!isSpaceChar(c));

            return res.toString();
        }

        public boolean isSpaceChar(int c) {

            if (filter != null)
                return filter.isSpaceChar(c);

            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}


import java.util.Scanner;

public class MinimizingTheString {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String ns = sc.next();
		for (int i = 0; i < n-1; i++) {
			if (ns.charAt(i) >= ns.charAt(i + 1)) {
				System.out.println(ns.substring(0, i) + ns.substring(i+1));
				return;
			}
		}
		System.out.println(ns.substring(0));
	}

}


import java.util.Scanner;

public class MinimizingTheString {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String ns = sc.next();
		for (int i = 0; i < n-1; i++) {
			if (ns.charAt(i) > ns.charAt(i + 1)) {
				System.out.println(ns.substring(0, i) + ns.substring(i+1));
				return;
			}
		}
		System.out.println(ns.substring(0));
	}

}


import java.util.Scanner;

public class MinimizingTheString {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String ns = sc.next();
		for (int i = 0; i < n-1; i++) {
			if (ns.charAt(i) > ns.charAt(i + 1)) {
				System.out.println(ns.substring(0, i) + ns.substring(i+1));
				return;
			}
		}
		System.out.println(ns.substring(0,n-1));
	}

}


import java.util.*;
import java.io.*;

public class Main {

	public static int mod = 1000000007;

	public static void solve(InputReader in) {
		int n = in.readInt();
		char s[] = in.readString().toCharArray();
		int index = 0;
		for(int i = 0; i<n-1; i++) {
			if(s[i] > s[i+1]) {
				index = i;
				break;
			}
		}
		s[index] = '4';
		for(char c : s) {
			if(c == '4') continue;
			System.out.print(c);
		}

	}

	public static void main(String[] args) {
		InputReader in = new InputReader(System.in);
		int t = 1;
		while (t-- > 0)
			solve(in);
	}
}

class InputReader{
	private InputStream stream;
	private byte[] buf = new byte[1024];
	private int curChar;
	private int numChars;
	private SpaceCharFilter filter;

	 public InputReader(InputStream stream) {
		this.stream = stream;
	}

     public int read() {
		if (numChars == -1)
			throw new InputMismatchException();
		if (curChar >= numChars) {
			curChar = 0;
			try {
				numChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (numChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}

     public int readInt() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

     public String readString() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		StringBuilder res = new StringBuilder();
		do {
			res.appendCodePoint(c);
			c = read();
		} while (!isSpaceChar(c));
		return res.toString();
	}

     public long readLong() {
		int c = read();
		while (isSpaceChar(c)) {
			c = read();
		}
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		long res = 0;
		do {
			if (c < '0' || c > '9') {
				throw new InputMismatchException();
			}
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

     public boolean isSpaceChar(int c) {
		if (filter != null)
			return filter.isSpaceChar(c);
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}

     public String next() {
		return readString();
	}

     public interface SpaceCharFilter {
		public boolean isSpaceChar(int ch);
	}
}


import java.util.*;
import java.io.*;

public class Main {

	public static int mod = 1000000007;

	public static void solve(InputReader in) {
		int n = in.readInt();
		char s[] = in.readString().toCharArray();
		int index = 0;
		for(int i = 0; i<n-1; i++) {
			if(s[i] > s[i-1]) {
				index = i;
				break;
			}
		}
		s[index] = '4';
		for(char c : s) {
			if(c == '4') continue;
			System.out.print(c);
		}

	}

	public static void main(String[] args) {
		InputReader in = new InputReader(System.in);
		int t = 1;
		while (t-- > 0)
			solve(in);
	}
}

class InputReader{
	private InputStream stream;
	private byte[] buf = new byte[1024];
	private int curChar;
	private int numChars;
	private SpaceCharFilter filter;

	 public InputReader(InputStream stream) {
		this.stream = stream;
	}

     public int read() {
		if (numChars == -1)
			throw new InputMismatchException();
		if (curChar >= numChars) {
			curChar = 0;
			try {
				numChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (numChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}

     public int readInt() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

     public String readString() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		StringBuilder res = new StringBuilder();
		do {
			res.appendCodePoint(c);
			c = read();
		} while (!isSpaceChar(c));
		return res.toString();
	}

     public long readLong() {
		int c = read();
		while (isSpaceChar(c)) {
			c = read();
		}
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		long res = 0;
		do {
			if (c < '0' || c > '9') {
				throw new InputMismatchException();
			}
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

     public boolean isSpaceChar(int c) {
		if (filter != null)
			return filter.isSpaceChar(c);
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}

     public String next() {
		return readString();
	}

     public interface SpaceCharFilter {
		public boolean isSpaceChar(int ch);
	}
}


import java.util.*;
import java.io.*;

public class Main {

	public static int mod = 1000000007;

	public static void solve(InputReader in) {
		int n = in.readInt();
		char s[] = in.readString().toCharArray();
		char cmp = s[0];
		int index = 0;
		for(int i = 0; i<n; i++) {
		    if(cmp < s[i]) {
		    	cmp = s[i];
		    	index = i;
		    }
		}
		s[index] = '4';
		for(char c : s) {
			if(c == '4') continue;
			System.out.print(c);
		}

	}

	public static void main(String[] args) {
		InputReader in = new InputReader(System.in);
		int t = 1;
		while (t-- > 0)
			solve(in);
	}
}

class InputReader{
	private InputStream stream;
	private byte[] buf = new byte[1024];
	private int curChar;
	private int numChars;
	private SpaceCharFilter filter;

	 public InputReader(InputStream stream) {
		this.stream = stream;
	}

     public int read() {
		if (numChars == -1)
			throw new InputMismatchException();
		if (curChar >= numChars) {
			curChar = 0;
			try {
				numChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (numChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}

     public int readInt() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

     public String readString() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		StringBuilder res = new StringBuilder();
		do {
			res.appendCodePoint(c);
			c = read();
		} while (!isSpaceChar(c));
		return res.toString();
	}

     public long readLong() {
		int c = read();
		while (isSpaceChar(c)) {
			c = read();
		}
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		long res = 0;
		do {
			if (c < '0' || c > '9') {
				throw new InputMismatchException();
			}
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

     public boolean isSpaceChar(int c) {
		if (filter != null)
			return filter.isSpaceChar(c);
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}

     public String next() {
		return readString();
	}

     public interface SpaceCharFilter {
		public boolean isSpaceChar(int ch);
	}
}


import java.util.*;
import java.io.*;

public class Main {

	public static int mod = 1000000007;

	public static void solve(InputReader in) {
		int n = in.readInt();
		char s[] = in.readString().toCharArray();
		int index = n-1;
		for(int i = 0; i<n-1; i++) {
			if(s[i] > s[i+1]) {
				index = i;
				break;
			}
		}
		s[index] = '4';
		for(char c : s) {
			if(c == '4') continue;
			System.out.print(c);
		}

	}

	public static void main(String[] args) {
		InputReader in = new InputReader(System.in);
		int t = 1;
		while (t-- > 0)
			solve(in);
	}
}

class InputReader{
	private InputStream stream;
	private byte[] buf = new byte[1024];
	private int curChar;
	private int numChars;
	private SpaceCharFilter filter;

	 public InputReader(InputStream stream) {
		this.stream = stream;
	}

     public int read() {
		if (numChars == -1)
			throw new InputMismatchException();
		if (curChar >= numChars) {
			curChar = 0;
			try {
				numChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (numChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}

     public int readInt() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

     public String readString() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		StringBuilder res = new StringBuilder();
		do {
			res.appendCodePoint(c);
			c = read();
		} while (!isSpaceChar(c));
		return res.toString();
	}

     public long readLong() {
		int c = read();
		while (isSpaceChar(c)) {
			c = read();
		}
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		long res = 0;
		do {
			if (c < '0' || c > '9') {
				throw new InputMismatchException();
			}
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

     public boolean isSpaceChar(int c) {
		if (filter != null)
			return filter.isSpaceChar(c);
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}

     public String next() {
		return readString();
	}

     public interface SpaceCharFilter {
		public boolean isSpaceChar(int ch);
	}
}


import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;

import static java.lang.Math.*;

public class Cf182 implements Runnable
{
	static class InputReader
	{
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;
		private SpaceCharFilter filter;
		private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		public InputReader(InputStream stream)
		{
			this.stream = stream;
		}

		public int read()
		{
			if (numChars==-1)
				throw new InputMismatchException();

			if (curChar >= numChars)
			{
				curChar = 0;
				try
				{
					numChars = stream.read(buf);
				}
				catch (IOException e)
				{
					throw new InputMismatchException();
				}

				if(numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public String nextLine()
		{
			String str = "";
			try
			{
				str = br.readLine();
			}
			catch (IOException e)
			{
				e.printStackTrace();
			}
			return str;
		}
		public int nextInt()
		{
			int c = read();

			while(isSpaceChar(c))
				c = read();

			int sgn = 1;

			if (c == '-')
			{
				sgn = -1;
				c = read();
			}

			int res = 0;
			do
			{
				if(c<'0'||c>'9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			while (!isSpaceChar(c));

			return res * sgn;
		}

		public long nextLong()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-')
			{
				sgn = -1;
				c = read();
			}
			long res = 0;

			do
			{
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			while (!isSpaceChar(c));
				return res * sgn;
		}

		public double nextDouble()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-')
			{
				sgn = -1;
				c = read();
			}
			double res = 0;
			while (!isSpaceChar(c) && c != '.')
			{
				if (c == 'e' || c == 'E')
					return res * Math.pow(10, nextInt());
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			if (c == '.')
			{
				c = read();
				double m = 1;
				while (!isSpaceChar(c))
				{
					if (c == 'e' || c == 'E')
						return res * Math.pow(10, nextInt());
					if (c < '0' || c > '9')
						throw new InputMismatchException();
					m /= 10;
					res += (c - '0') * m;
					c = read();
				}
			}
			return res * sgn;
		}

		public String readString()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do
			{
				res.appendCodePoint(c);
				c = read();
			}
			while (!isSpaceChar(c));

			return res.toString();
		}

		public boolean isSpaceChar(int c)
		{
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public String next()
		{
			return readString();
		}

		public interface SpaceCharFilter
		{
			public boolean isSpaceChar(int ch);
		}
	}
	public static void main(String args[]) throws Exception
	{
		new Thread(null, new Cf182(),"Main",1<<27).start();
	}

	public static long gcd(long a, long b)
	{
		if (a == 0)
			return b;
		return gcd(b % a, a);
	}
	//  array sorting by colm
public static void sortbyColumn(int arr[][], int col)
    {

        Arrays.sort(arr, new Comparator<int[]>() {

          @Override
          public int compare(final int[] entry1,
                             final int[] entry2) {

            if (entry1[col] > entry2[col])
                return 1;
            else
                return -1;
          }
        });
    }

	// gcd

	public static long findGCD(long arr[], int n)
	{
		long result = arr[0];
		for (int i = 1; i < n; i++)
			result = gcd(arr[i], result);
		return result;
	}
	// fibonaci
	static int fib(int n)
    {
        int a = 0, b = 1, c;
        if (n == 0)
            return a;
        for (int i = 2; i <= n; i++)
        {
            c = a + b;
            a = b;
            b = c;
        }
        return b;
    }

// sort a string
    public static String sortString(String inputString)
    {

        char tempArray[] = inputString.toCharArray();

        Arrays.sort(tempArray);

        return new String(tempArray);
    }
    // pair function

    // list.add(new Pair<>(sc.nextInt(), i + 1));
    //     Collections.sort(list, (a, b) -> Integer.compare(b.first, a.first));
    private static class Pair<F, S> {

        private F first;

        private S second;

        public Pair() {}

        public Pair(F first, S second) {
            this.first = first;
            this.second = second;
        }
    }

    public static long function(long n)
    {
        long mod = n % 4;

        if (mod == 0)
            return n;

        // If n % 4 gives remainder 1
        else if (mod == 1)
            return 1;

        // If n % 4 gives remainder 2
        else if (mod == 2)
            return n + 1;

        // If n % 4 gives remainder 3
        else if (mod == 3)
            return (long)0;
        return (long)0;
    }

	public void run()
	{
		InputReader sc = new InputReader(System.in);
		PrintWriter w = new PrintWriter(System.out);
		int n = sc.nextInt();
		String s = sc.next();
		int index = 0;
		int l = s.length();
		for(int i=1;i<l;i++)
		{
		    if(s.charAt(i)>s.charAt(i-1))
		        continue;
		    else
		    {
		        index = i-1;
		        break;
		    }
		}
		for(int i=0;i<l;i++)
		{
		    if(index!=i)
		        w.print(s.charAt(i));
		}
		w.println();
        w.flush();
	    w.close();
	}
}


import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;

import static java.lang.Math.*;

public class Cf182 implements Runnable
{
	static class InputReader
	{
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;
		private SpaceCharFilter filter;
		private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		public InputReader(InputStream stream)
		{
			this.stream = stream;
		}

		public int read()
		{
			if (numChars==-1)
				throw new InputMismatchException();

			if (curChar >= numChars)
			{
				curChar = 0;
				try
				{
					numChars = stream.read(buf);
				}
				catch (IOException e)
				{
					throw new InputMismatchException();
				}

				if(numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public String nextLine()
		{
			String str = "";
			try
			{
				str = br.readLine();
			}
			catch (IOException e)
			{
				e.printStackTrace();
			}
			return str;
		}
		public int nextInt()
		{
			int c = read();

			while(isSpaceChar(c))
				c = read();

			int sgn = 1;

			if (c == '-')
			{
				sgn = -1;
				c = read();
			}

			int res = 0;
			do
			{
				if(c<'0'||c>'9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			while (!isSpaceChar(c));

			return res * sgn;
		}

		public long nextLong()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-')
			{
				sgn = -1;
				c = read();
			}
			long res = 0;

			do
			{
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			while (!isSpaceChar(c));
				return res * sgn;
		}

		public double nextDouble()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-')
			{
				sgn = -1;
				c = read();
			}
			double res = 0;
			while (!isSpaceChar(c) && c != '.')
			{
				if (c == 'e' || c == 'E')
					return res * Math.pow(10, nextInt());
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			if (c == '.')
			{
				c = read();
				double m = 1;
				while (!isSpaceChar(c))
				{
					if (c == 'e' || c == 'E')
						return res * Math.pow(10, nextInt());
					if (c < '0' || c > '9')
						throw new InputMismatchException();
					m /= 10;
					res += (c - '0') * m;
					c = read();
				}
			}
			return res * sgn;
		}

		public String readString()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do
			{
				res.appendCodePoint(c);
				c = read();
			}
			while (!isSpaceChar(c));

			return res.toString();
		}

		public boolean isSpaceChar(int c)
		{
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public String next()
		{
			return readString();
		}

		public interface SpaceCharFilter
		{
			public boolean isSpaceChar(int ch);
		}
	}
	public static void main(String args[]) throws Exception
	{
		new Thread(null, new Cf182(),"Main",1<<27).start();
	}

	public static long gcd(long a, long b)
	{
		if (a == 0)
			return b;
		return gcd(b % a, a);
	}
	//  array sorting by colm
public static void sortbyColumn(int arr[][], int col)
    {

        Arrays.sort(arr, new Comparator<int[]>() {

          @Override
          public int compare(final int[] entry1,
                             final int[] entry2) {

            if (entry1[col] > entry2[col])
                return 1;
            else
                return -1;
          }
        });
    }

	// gcd

	public static long findGCD(long arr[], int n)
	{
		long result = arr[0];
		for (int i = 1; i < n; i++)
			result = gcd(arr[i], result);
		return result;
	}
	// fibonaci
	static int fib(int n)
    {
        int a = 0, b = 1, c;
        if (n == 0)
            return a;
        for (int i = 2; i <= n; i++)
        {
            c = a + b;
            a = b;
            b = c;
        }
        return b;
    }

// sort a string
    public static String sortString(String inputString)
    {

        char tempArray[] = inputString.toCharArray();

        Arrays.sort(tempArray);

        return new String(tempArray);
    }
    // pair function

    // list.add(new Pair<>(sc.nextInt(), i + 1));
    //     Collections.sort(list, (a, b) -> Integer.compare(b.first, a.first));
    private static class Pair<F, S> {

        private F first;

        private S second;

        public Pair() {}

        public Pair(F first, S second) {
            this.first = first;
            this.second = second;
        }
    }

    public static long function(long n)
    {
        long mod = n % 4;

        if (mod == 0)
            return n;

        // If n % 4 gives remainder 1
        else if (mod == 1)
            return 1;

        // If n % 4 gives remainder 2
        else if (mod == 2)
            return n + 1;

        // If n % 4 gives remainder 3
        else if (mod == 3)
            return (long)0;
        return (long)0;
    }

	public void run()
	{
		InputReader sc = new InputReader(System.in);
		PrintWriter w = new PrintWriter(System.out);
		int n = sc.nextInt();
		String s = sc.next();
		int index = 0;
		int l = s.length();
		int flag = 0;
		for(int i=1;i<l;i++)
		{
		    if(s.charAt(i)>s.charAt(i-1))
		        continue;
		    else
		    {
		        index = i-1;
		        flag = 1;
		        break;
		    }
		}
		if(flag==0)
		    index = l-1;
		for(int i=0;i<l;i++)
		{
		    if(index!=i)
		        w.print(s.charAt(i));
		}
		w.println();
        w.flush();
	    w.close();
	}
}


import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;

import static java.lang.Math.*;

public class Cf182 implements Runnable
{
	static class InputReader
	{
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;
		private SpaceCharFilter filter;
		private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		public InputReader(InputStream stream)
		{
			this.stream = stream;
		}

		public int read()
		{
			if (numChars==-1)
				throw new InputMismatchException();

			if (curChar >= numChars)
			{
				curChar = 0;
				try
				{
					numChars = stream.read(buf);
				}
				catch (IOException e)
				{
					throw new InputMismatchException();
				}

				if(numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public String nextLine()
		{
			String str = "";
			try
			{
				str = br.readLine();
			}
			catch (IOException e)
			{
				e.printStackTrace();
			}
			return str;
		}
		public int nextInt()
		{
			int c = read();

			while(isSpaceChar(c))
				c = read();

			int sgn = 1;

			if (c == '-')
			{
				sgn = -1;
				c = read();
			}

			int res = 0;
			do
			{
				if(c<'0'||c>'9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			while (!isSpaceChar(c));

			return res * sgn;
		}

		public long nextLong()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-')
			{
				sgn = -1;
				c = read();
			}
			long res = 0;

			do
			{
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			while (!isSpaceChar(c));
				return res * sgn;
		}

		public double nextDouble()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-')
			{
				sgn = -1;
				c = read();
			}
			double res = 0;
			while (!isSpaceChar(c) && c != '.')
			{
				if (c == 'e' || c == 'E')
					return res * Math.pow(10, nextInt());
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			if (c == '.')
			{
				c = read();
				double m = 1;
				while (!isSpaceChar(c))
				{
					if (c == 'e' || c == 'E')
						return res * Math.pow(10, nextInt());
					if (c < '0' || c > '9')
						throw new InputMismatchException();
					m /= 10;
					res += (c - '0') * m;
					c = read();
				}
			}
			return res * sgn;
		}

		public String readString()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do
			{
				res.appendCodePoint(c);
				c = read();
			}
			while (!isSpaceChar(c));

			return res.toString();
		}

		public boolean isSpaceChar(int c)
		{
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public String next()
		{
			return readString();
		}

		public interface SpaceCharFilter
		{
			public boolean isSpaceChar(int ch);
		}
	}
	public static void main(String args[]) throws Exception
	{
		new Thread(null, new Cf182(),"Main",1<<27).start();
	}

	public static long gcd(long a, long b)
	{
		if (a == 0)
			return b;
		return gcd(b % a, a);
	}
	//  array sorting by colm
public static void sortbyColumn(int arr[][], int col)
    {

        Arrays.sort(arr, new Comparator<int[]>() {

          @Override
          public int compare(final int[] entry1,
                             final int[] entry2) {

            if (entry1[col] > entry2[col])
                return 1;
            else
                return -1;
          }
        });
    }

	// gcd

	public static long findGCD(long arr[], int n)
	{
		long result = arr[0];
		for (int i = 1; i < n; i++)
			result = gcd(arr[i], result);
		return result;
	}
	// fibonaci
	static int fib(int n)
    {
        int a = 0, b = 1, c;
        if (n == 0)
            return a;
        for (int i = 2; i <= n; i++)
        {
            c = a + b;
            a = b;
            b = c;
        }
        return b;
    }

// sort a string
    public static String sortString(String inputString)
    {

        char tempArray[] = inputString.toCharArray();

        Arrays.sort(tempArray);

        return new String(tempArray);
    }
    // pair function

    // list.add(new Pair<>(sc.nextInt(), i + 1));
    //     Collections.sort(list, (a, b) -> Integer.compare(b.first, a.first));
    private static class Pair<F, S> {

        private F first;

        private S second;

        public Pair() {}

        public Pair(F first, S second) {
            this.first = first;
            this.second = second;
        }
    }

    public static long function(long n)
    {
        long mod = n % 4;

        if (mod == 0)
            return n;

        // If n % 4 gives remainder 1
        else if (mod == 1)
            return 1;

        // If n % 4 gives remainder 2
        else if (mod == 2)
            return n + 1;

        // If n % 4 gives remainder 3
        else if (mod == 3)
            return (long)0;
        return (long)0;
    }

	public void run()
	{
		InputReader sc = new InputReader(System.in);
		PrintWriter w = new PrintWriter(System.out);
		int n = sc.nextInt();
		String s = sc.next();
		int index = 0;
		int l = s.length();
		for(int i=0;i<l;i++)
		{
		    if(s.charAt(i)>s.charAt(index))
		        index = i;
		}
		for(int i=0;i<l;i++)
		{
		    if(index!=i)
		        w.print(s.charAt(i));
		}
		w.println();
        w.flush();
	    w.close();
	}
}


import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;

import static java.lang.Math.*;

public class Cf182 implements Runnable
{
	static class InputReader
	{
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;
		private SpaceCharFilter filter;
		private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		public InputReader(InputStream stream)
		{
			this.stream = stream;
		}

		public int read()
		{
			if (numChars==-1)
				throw new InputMismatchException();

			if (curChar >= numChars)
			{
				curChar = 0;
				try
				{
					numChars = stream.read(buf);
				}
				catch (IOException e)
				{
					throw new InputMismatchException();
				}

				if(numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public String nextLine()
		{
			String str = "";
			try
			{
				str = br.readLine();
			}
			catch (IOException e)
			{
				e.printStackTrace();
			}
			return str;
		}
		public int nextInt()
		{
			int c = read();

			while(isSpaceChar(c))
				c = read();

			int sgn = 1;

			if (c == '-')
			{
				sgn = -1;
				c = read();
			}

			int res = 0;
			do
			{
				if(c<'0'||c>'9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			while (!isSpaceChar(c));

			return res * sgn;
		}

		public long nextLong()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-')
			{
				sgn = -1;
				c = read();
			}
			long res = 0;

			do
			{
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			while (!isSpaceChar(c));
				return res * sgn;
		}

		public double nextDouble()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-')
			{
				sgn = -1;
				c = read();
			}
			double res = 0;
			while (!isSpaceChar(c) && c != '.')
			{
				if (c == 'e' || c == 'E')
					return res * Math.pow(10, nextInt());
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			if (c == '.')
			{
				c = read();
				double m = 1;
				while (!isSpaceChar(c))
				{
					if (c == 'e' || c == 'E')
						return res * Math.pow(10, nextInt());
					if (c < '0' || c > '9')
						throw new InputMismatchException();
					m /= 10;
					res += (c - '0') * m;
					c = read();
				}
			}
			return res * sgn;
		}

		public String readString()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do
			{
				res.appendCodePoint(c);
				c = read();
			}
			while (!isSpaceChar(c));

			return res.toString();
		}

		public boolean isSpaceChar(int c)
		{
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public String next()
		{
			return readString();
		}

		public interface SpaceCharFilter
		{
			public boolean isSpaceChar(int ch);
		}
	}
	public static void main(String args[]) throws Exception
	{
		new Thread(null, new Cf182(),"Main",1<<27).start();
	}

	public static long gcd(long a, long b)
	{
		if (a == 0)
			return b;
		return gcd(b % a, a);
	}
	//  array sorting by colm
public static void sortbyColumn(int arr[][], int col)
    {

        Arrays.sort(arr, new Comparator<int[]>() {

          @Override
          public int compare(final int[] entry1,
                             final int[] entry2) {

            if (entry1[col] > entry2[col])
                return 1;
            else
                return -1;
          }
        });
    }

	// gcd

	public static long findGCD(long arr[], int n)
	{
		long result = arr[0];
		for (int i = 1; i < n; i++)
			result = gcd(arr[i], result);
		return result;
	}
	// fibonaci
	static int fib(int n)
    {
        int a = 0, b = 1, c;
        if (n == 0)
            return a;
        for (int i = 2; i <= n; i++)
        {
            c = a + b;
            a = b;
            b = c;
        }
        return b;
    }

// sort a string
    public static String sortString(String inputString)
    {

        char tempArray[] = inputString.toCharArray();

        Arrays.sort(tempArray);

        return new String(tempArray);
    }
    // pair function

    // list.add(new Pair<>(sc.nextInt(), i + 1));
    //     Collections.sort(list, (a, b) -> Integer.compare(b.first, a.first));
    private static class Pair<F, S> {

        private F first;

        private S second;

        public Pair() {}

        public Pair(F first, S second) {
            this.first = first;
            this.second = second;
        }
    }

    public static long function(long n)
    {
        long mod = n % 4;

        if (mod == 0)
            return n;

        // If n % 4 gives remainder 1
        else if (mod == 1)
            return 1;

        // If n % 4 gives remainder 2
        else if (mod == 2)
            return n + 1;

        // If n % 4 gives remainder 3
        else if (mod == 3)
            return (long)0;
        return (long)0;
    }

	public void run()
	{
		InputReader sc = new InputReader(System.in);
		PrintWriter w = new PrintWriter(System.out);
		int n = sc.nextInt();
		String s = sc.next();
		int l = s.length();
		int index = l-1;
		for(int i=1;i<l;i++)
		{
		    if(s.charAt(i)>=s.charAt(i-1))
		        continue;
		    else
		    {
		        index = i-1;
		        break;
		    }
		}
		for(int i=0;i<l;i++)
		{
		    if(index!=i)
		        w.print(s.charAt(i));
		}
		w.println();
        w.flush();
	    w.close();
	}
}


import java.util.Scanner;

public class MinimizingTheString1076A {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();

		scan.nextLine();

		String str = scan.nextLine();

		StringBuilder a = new StringBuilder(str);

		StringBuilder small = new StringBuilder(str);

		for(int i = 0; i < n; i++) {

			StringBuilder temp1 = new StringBuilder(str);

			temp1.deleteCharAt(i);

			if(small.toString().compareTo(temp1.toString()) > 0) {
				small = temp1;
			}

		}
		scan.close();

		System.out.println(small);
	}
}


import java.util.Scanner;

public class MinimizingTheString1076A {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();

		scan.nextLine();

		String str = scan.nextLine();

		StringBuilder temp = new StringBuilder(str);
		int index = n-1;

		for(int i = 0; i < n-1; i++) {

			if(str.charAt(i) > str.charAt(i+1)) {
				index = i;
			}

		}
		scan.close();

		String res = temp.deleteCharAt(index).toString();

		System.out.println(res);
	}
}


import java.util.Scanner;

public class MinimizingTheString1076A {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();

		scan.nextLine();

		String str = scan.nextLine();

		String small = str;

		for(int i = 0; i < n; i++) {

			String temp = str.substring(0, i) + str.substring(i+1);

			if(small.compareTo(temp) > 0) {
				small = temp;
			}

		}
		scan.close();

		System.out.println(small);
	}
}


import java.util.Scanner;

public class MinimizingTheString1076A {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();

		scan.nextLine();

		String str = scan.nextLine();

		StringBuilder temp = new StringBuilder(str);
		int index = n-1;

		for(int i = 0; i < n-1; i++) {

			if(str.charAt(i) > str.charAt(i+1)) {
				index = i;
				break;
			}

		}
		scan.close();

		String res = temp.deleteCharAt(index).toString();

		System.out.println(res);
	}
}


import java.util.Scanner;

public class MinimizingTheString1076A {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();

		scan.nextLine();

		String str = scan.nextLine();

		StringBuilder temp = new StringBuilder(str);
		int index = 0;

		for(int i = 0; i < n-1; i++) {

			if(str.charAt(i) > str.charAt(i+1)) {
				index = i;
			}

		}
		scan.close();

		String res = temp.deleteCharAt(index).toString();

		System.out.println(res);
	}
}


import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Objects;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.stream.Collectors;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class myFile
{
	public static void main(String args[]) throws IOException
	{
		int i,n;
		boolean found=false;
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String s[]=br.readLine().split(" ");
		n = Integer.parseInt(s[0]);
		String str=br.readLine();
		StringBuilder sb = new StringBuilder(str);
		for(i=0;i<str.length()-1;i++)
		{
			if(str.charAt(i)>str.charAt(i+1) && found==false)
			{
				sb = sb.deleteCharAt(i);
				found=true;
			}
		}
		if(found==false)
			sb.deleteCharAt(n-1);
		System.out.println(sb);
	}

}


import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Objects;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.stream.Collectors;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class myFile
{
	public static void main(String args[]) throws IOException
	{
		int i,n,max;
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String s[]=br.readLine().split(" ");
		n = Integer.parseInt(s[0]);
		String str=br.readLine();
		max=n-1;
		for(i=0;i<str.length()-1;i++)
		{
			if(str.charAt(i)>str.charAt(i+1))
			{
				max=i;
				break;
			}
		}
		String ans="";
		for(i=0;i<str.length();i++)
		{
			if(max!=i)ans+=str.charAt(i);
		}
		System.out.println(ans);
	}

}


import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Objects;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.stream.Collectors;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class myFile
{
	public static void main(String args[]) throws IOException
	{
		int i,n;
		char max;
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String s[]=br.readLine().split(" ");
		n = Integer.parseInt(s[0]);
		String str=br.readLine();
		max=str.charAt(0);
		for(i=0;i<str.length();i++)
		{
			if(max<str.charAt(i))
			{
				max=str.charAt(i);
			}
		}
		boolean found=false;
		String ans="";
		for(i=0;i<str.length();i++)
		{
			if(str.charAt(i)!=max || found==true)
			{
				ans=ans+str.charAt(i);
			}
			if(found==false && str.charAt(i)==max)
			{
				found=true;
			}
		}
		System.out.println(ans);
	}

}


import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Objects;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.stream.Collectors;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class myFile
{
	public static void main(String args[]) throws IOException
	{
		int i,n;
		boolean found=false;
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String s[]=br.readLine().split(" ");
		n = Integer.parseInt(s[0]);
		String str=br.readLine();
		String ans="";
		for(i=0;i<str.length()-1;i++)
		{
			if(str.charAt(i)>str.charAt(i+1) && found==false)
			{
				found=true;
			}
			else
				ans+=str.charAt(i);
		}
		if(found)
			ans+=str.charAt(n-1);
		System.out.println(ans);
	}

}


import java.util.Scanner;
public class Main {
//COmment
  public static void main(String[] args) {
    Scanner input = new Scanner(System.in);
    input.nextInt();
    String full=input.next();
    String min = full.substring(1);
    for(int x=1;x<full.length();x++){
      if(full.charAt(x)<full.charAt(x-1)){
        System.out.println(full.substring(0,x-1)+full.substring(x));
        return;
      }
    }
    System.out.println(full.substring(1));

  }
}


import java.util.Scanner;
public class Main {
  public static void main(String[] args) {
    Scanner input = new Scanner(System.in);
    input.nextInt();
    String full = input.next();
    String min = full.substring(1);
    for(int x=0;x<full.length();x++){
      if(min.compareTo(full.substring(0,x)+full.substring(x+1))>0){
        min = full.substring(0,x)+full.substring(x+1);
      }
  }
  System.out.println(min);

  }

}


import java.util.Scanner;
public class Main {
//COmment
  public static void main(String[] args) {
    Scanner input = new Scanner(System.in);
    input.nextInt();
    String full=input.next();
    for(int x=1;x<full.length();x++){
      if(full.charAt(x)<full.charAt(x-1)){
        System.out.println(full.substring(0,x-1)+full.substring(x));
        return;
      }
    }
    System.out.println(full.substring(0,full.length()-1));

  }
}


import java.util.Scanner;
public class Main {

  public static void main(String[] args) {
    Scanner input = new Scanner(System.in);
    input.nextInt();
    String full=input.next();
    String min = full.substring(1);
    for(int x=1;x<full.length();x++){
      if(full.charAt(x)<full.charAt(x-1)){
        System.out.println(full.substring(0,x-1)+full.substring(x));
        return;
      }
    }
    System.out.println(full.substring(1));

  }
}


import java.util.*;
import java.io.IOException;
public class aa
{
    public static void main(String[]args)throws IOException
    {	Scanner sc=new Scanner (System.in);
		int n=sc.nextInt();
		String s=sc.next();
		String ns=""; char max='$';
		for(int i=0;i<n-1;i++)
		{
		    if(s.charAt(i)>s.charAt(i+1))
		    {max=s.charAt(i);

		    ns=s.substring(0,s.indexOf(max))+s.substring(s.indexOf(max)+1);break;}

		}
		if(max=='$')
		{
		   ns=s.substring(0,n-1);
		}
		System.out.println(ns);
		}
		}


import java.util.*;
import java.io.IOException;
public class againtwentyfive
{
    public static void main(String[]args)throws IOException
    {	Scanner sc=new Scanner (System.in);
		int n=sc.nextInt();
		String s=sc.next();
		String ns=""; char max='a';
		for(int i=0;i<n;i++)
		{
		    if(s.charAt(i)>max)
		    max=s.charAt(i);
		}
		for(int i=0;i<n;i++)
		{
		    if(i!=s.indexOf(max))
		    ns=ns+s.charAt(i);
		}
		if(ns.length()>0)
		System.out.println(ns);
		else
		{
		 char cc=max--;
		ns=s.substring(s.length()-1)+cc;
		System.out.println(ns);
		}
	}
}


import java.util.*;
import java.io.IOException;
public class minimise
{
    public static void main(String[]args)throws IOException
	{
		Scanner sc=new Scanner (System.in);
		int n=sc.nextInt();
		String s=sc.next();
		String ns=""; char max='a';
		for(int i=0;i<n;i++)
		{
		    if(s.charAt(i)>max)
		    max=s.charAt(i);
		}
		for(int i=0;i<n;i++)
		{
		    if(i!=s.indexOf(max))
		    ns=ns+s.charAt(i);
		}
		System.out.println(ns);
	}
}


import java.util.*;
import java.io.IOException;
public class againtwentyfive
{
    public static void main(String[]args)throws IOException
    {	Scanner sc=new Scanner (System.in);
		int n=sc.nextInt();
		String s=sc.next();
		int c=0;
		for(int i=0;i<n-1;i++)
		{
		    if(s.charAt(i)>s.charAt(i+1))
		    {s=s.substring(0,i)+"$"+s.substring(i+1);
		    c++;
		    break;}
		}
		if(c!=0)
		{for(int i=0;i<n;i++)
		{
		    if(s.charAt(i)!='$')
		    System.out.print(s.charAt(i));
		}
		}
		else
		{
		    for(int i=0;i<n-1;i++)
		    System.out.print(s.charAt(i));
		}
	}
}


import java.util.*;
import java.io.IOException;
public class againtwentyfive
{
    public static void main(String[]args)throws IOException
    {	Scanner sc=new Scanner (System.in);
		int n=sc.nextInt();
		String s=sc.next();
		String ns=""; char max='a';
		for(int i=0;i<n;i++)
		{
		    if(s.charAt(i)>max)
		    max=s.charAt(i);
		}
		if(s.charAt(0)<s.charAt(1))
		{
		    ns=s.substring(0,s.indexOf(max))+s.substring(s.indexOf(max)+1);
		//for(int i=0;i<n;i++)
		//{
		  //  if(i!=s.indexOf(max))
		   // ns=ns+s.charAt(i);
		//}
		}
		else{
		    ns=s.substring(1);
		}
		System.out.println(ns);
		}
		}


import java.util.*;
import java.io.IOException;
public class againtwentyfive
{
    public static void main(String[]args)throws IOException
    {	Scanner sc=new Scanner (System.in);
		int n=sc.nextInt();
		String s=sc.next();
		int c=0;
		for(int i=0;i<n-1;i++)
		{
		    if(s.charAt(i)>s.charAt(i+1))
		    {s=s.substring(0,i)+"#"+s.substring(i+1);
		    c++;
		    break;}
		}
		if(c!=0)
		{for(int i=0;i<n;i++)
		{
		    if(s.charAt(i)!='#')
		    System.out.print(s.charAt(i));
		}
		}
		else
		{
		    for(int i=0;i<n-1;i++)
		    System.out.print(s.charAt(i));
		}
	}
}


import java.util.*;
import java.io.IOException;
public class againtwentyfive
{
    public static void main(String[]args)throws IOException
    	{
	Scanner sc=new Scanner (System.in);
		int n=sc.nextInt();
		String s=sc.next();
		String ns=""; char max='a';
		for(int i=0;i<n;i++)
		{
		    if(s.charAt(i)>max)
		    max=s.charAt(i);
		}
		if(s.charAt(0)<s.charAt(1))
		{
		for(int i=0;i<n;i++)
		{
		    if(i!=s.indexOf(max))
		    ns=ns+s.charAt(i);
		}
		}
		else{
		    ns=s.substring(1);
		}
		System.out.println(ns);
		}
		}


import java.util.*;
import java.io.IOException;
public class aa
{
    public static void main(String[]args)throws IOException
    {	Scanner sc=new Scanner (System.in);
		int n=sc.nextInt();
		String s=sc.next();
		String ns=""; char max='$';
		for(int i=0;i<n-1;i++)
		{
		    if(s.charAt(i)>s.charAt(i+1))
		    {max=s.charAt(i);

		    ns=s.substring(0,s.indexOf(max))+s.substring(s.indexOf(max)+1);break;}

		}
		if(max=='$')
		{
		   ns=s.substring(0,n-2);
		}
		System.out.println(ns);
		}
		}


import java.util.Scanner;

public class A {
	public static void main(String[] args) {
		Scanner jin = new Scanner(System.in);
		jin.nextLine();
		String arr = jin.nextLine();
		String max = "z";
		for (int i = 0; i < arr.length(); ++i) {
			String curr = arr.substring(0, i) + arr.substring(i + 1, arr.length());
			if (curr.compareTo(max) < 0)
				max = curr;
		}
		System.out.println(max);
	}
}


import java.util.Scanner;

public class A {
	public static void main(String[] args) {
		Scanner jin = new Scanner(System.in);
		jin.nextLine();
		String str = jin.nextLine();

		for (int i = 0; i < str.length() - 1; ++i) {
			if (str.charAt(i) > str.charAt(i + 1)) {
				System.out.println(str.substring(0, i) + str.substring(i + 1, str.length()));
				return;
			}
		}
		System.out.println(str.substring(0, str.length() - 1));
	}
}


package EducationalCodeforcesRound54RatedforDiv2;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Scanner;

public class A {
	public static void main(String[] args) {
		Scanner jin = new Scanner(System.in);
		jin.nextLine();
		ArrayList<String> arr = new ArrayList<String>(Arrays.asList(jin.nextLine().split("")));
		String max = Collections.max(arr);
		int index = arr.indexOf(max);
		StringBuilder res = new StringBuilder();
		for (int i = 0; i < arr.size(); ++i) {
			if (i == index)
				continue;
			res.append(arr.get(i));
		}

		System.out.println(res.toString());
	}
}


import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Scanner;

public class A {
	public static void main(String[] args) {
		Scanner jin = new Scanner(System.in);
		jin.nextLine();
		ArrayList<String> arr = new ArrayList<String>(Arrays.asList(jin.nextLine().split("")));
		String max = Collections.max(arr);
		int index = arr.indexOf(max);
		StringBuilder res = new StringBuilder();
		for (int i = 0; i < arr.size(); ++i) {
			if (i == index)
				continue;
			res.append(arr.get(i));
		}

		System.out.println(res.toString());
	}
}


import java.util.Scanner;
public class orffjab
{
 public static void main(String[]args)
 {
  Scanner sc=new Scanner(System.in);
  int t=sc.nextInt();
  String s=sc.next();
  int a=t-1;
  int i=0;
  while(i<t-1){
   if((int)s.charAt(i)>(int)s.charAt(i+1)){
    a=i;
    break;
   }
   i++;
  }
  if(a==0){
   System.out.println(s.substring(1,t));
  }
  else if(a==t-1){
   System.out.println(s.substring(0,a));
  }
  else{
   System.out.println(s.substring(0,a)+s.substring(a+1,t));
  }
 }
}


import java.util.Scanner;
public class program9182
{
 public static void main(String[]args)
 {
  Scanner sc=new Scanner(System.in);
  int n=sc.nextInt();
  String s=sc.next();
  char c=s.charAt(n-1);
  int pos=-1;
  int i=0;
   while(i<n){
    if((int)s.charAt(i)>=(int)c){
     c=s.charAt(i);
     pos=i;
    }
    i++;
   }
   if(pos==0){
    System.out.println(s.substring(1,n));
   }
   else if(pos==n-1){
    System.out.println(s.substring(0,pos));
   }
   else{
    System.out.println(s.substring(0,pos)+s.substring(pos+1,n));
   }
  }
 }


import java.util.Scanner;
public class program9182
{
 public static void main(String[]args)
 {
  Scanner sc=new Scanner(System.in);
  int n=sc.nextInt();
  String s=sc.next();
  char c=s.charAt(n-1);
  int pos=-1;
  int i=0;
   while(i<n){
    if((int)s.charAt(i)>=(int)c){
     c=s.charAt(i);
     pos=i;
    }
    i++;
   }
   if(pos==0){
    System.out.println(s.substring(1,n));
   }
   else if(pos==n-1){
    System.out.println(s.substring(0,pos)+s.substring(pos+1,n)+s.charAt(n-1));
   }
   else{
    System.out.println(s.substring(0,pos)+s.substring(pos+1,n));
   }
  }
 }


import java.util.Scanner;
public class program9182
{
 public static void main(String[]args)
 {
  Scanner sc=new Scanner(System.in);
  int n=sc.nextInt();
  String s=sc.next();
  char c=s.charAt(n-1);
  int pos=0;
  int i=0;
   while(i<n){
    if((int)s.charAt(i)>=(int)c){
     c=s.charAt(i);
     pos=i;
    }
    i++;
   }
   if(pos==0){
    System.out.println(s.substring(1,n));
   }
   else{
    System.out.println(s.substring(0,pos)+s.substring(pos+1,n));
   }
  }
 }


import java.util.Scanner;

public class minimizingstring {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String s = sc.next();
		sc.close();

		String ans = "";
		for(int i = 0; i + 1 < n; i++) {
			if(s.charAt(i) - s.charAt(i+1) > 0) {
				ans = s.substring(0, i) + s.substring(i+1);
				break;
			}
		}
		if(ans.length() == 0) {
			ans = s.substring(0, n-1);
		}
		System.out.println(ans);
	}
}


import java.util.Scanner;

public class minimizingstring {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String s = sc.next();
		sc.close();

		String min = s.substring(0, n-1);
		for(int i = n-2; i >= 0; i--) {
			String sub = s.substring(0, i) + s.substring(i+1);
			if(sub.compareTo(min) < 0) {
				min = sub;
			}
		}
		System.out.println(min);
	}

}


import java.util.Scanner;

public class minimizingstring {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String s = sc.next();
		sc.close();

		String min = s.substring(1);
		for(int i = 1; i < n; i++) {
			String sub = s.substring(0, i) + s.substring(i+1);
			if(sub.compareTo(min) < 0) {
				min = sub;
			}
		}
		System.out.println(min);
	}

}


import java.util.Scanner;

public class minimizingstring {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String s = sc.next();
		sc.close();

		char[] arr = s.toCharArray();
		String min = s.substring(0, n-1);
		for(int i = n-2; i >= 0; i--) {
			String sub = s.substring(0, i) + s.substring(i+1);
			if(compare(min, sub, 0).equals(sub)) {
				min = sub;
			}
		}
		System.out.println(min);
//		System.out.println(compare("hoooop", "hoooop", 0));
	}

	public static String compare(String a, String b, int n) {
		if(n < Math.min(a.length(), b.length())) {
			if(a.charAt(n) - b.charAt(n) > 0) {
				return b;
			}
			else if(a.charAt(n) - b.charAt(n) < 0) {
				return a;
			}
			else {
				return compare(a, b, n+1);
			}
		}
		else {
			if(a.length() < b.length()) {
				return a;
			}
			else {
				return b;
			}
		}

	}
}


import java.io.*;
import java.util.*;

public class Towers {
    public static void main(String args[]) {
       Scanner input = new Scanner(System.in);
       int  n = input.nextInt();
       String temp = input.nextLine();
       String str = input.nextLine();

	   int to_delete = -1;
	   for ( int i = 0; i < str.length() - 1; i++){
		   if ( str.charAt(i) > str.charAt(i + 1) ){
			   to_delete = i;
			   break;
          }
	   }
	   if ( to_delete == -1 ){
	      for ( int i = 0; i < str.length() - 1; i++){
			  System.out.print(str.charAt(i));
		  }
	   }
	   else{
	      for ( int i =0 ; i < str.length(); i++){
			  if ( to_delete != -1 )
				  System.out.print(str.charAt(i));
	      }
	   }
}
}


import java.io.*;
import java.util.*;

public class Towers {
    public static void main(String args[]) {
       Scanner input = new Scanner(System.in);
       int  n = input.nextInt();
       String str = input.nextLine();

	   int to_delete = -1;
	   System.out.println(str.length());
	   for ( int i = 0; i < str.length() - 1; i++){
		   if ( str.charAt(i) > str.charAt(i + 1) ){
			   to_delete = i;
			   break;
          }
	   }
	   if ( to_delete == -1 ){
	      for ( int i = 0; i < str.length() - 1; i++){
			  System.out.print(str.charAt(i));
		  }
	   }
	   else{
	      for ( int i =0 ; i < str.length(); i++){
			  if ( to_delete != -1 )
				  System.out.print(str.charAt(i));
	      }
	   }
}
}


import java.io.*;
import java.util.*;

public class Towers {
    public static void main(String args[]) {
       Scanner input = new Scanner(System.in);
       int  n = input.nextInt();
       String temp = input.nextLine();
       String str = input.nextLine();

	   int to_delete = -1;
	   for ( int i = 0; i < str.length() - 1; i++){
		   if ( str.charAt(i) > str.charAt(i + 1) ){
			   to_delete = i;
			   break;
          }
	   }
	   if ( to_delete == -1 ){
	      for ( int i = 0; i < str.length() - 1; i++){
			  System.out.print(str.charAt(i));
		  }
	   }
	   else {
	      for ( int i =0  ; i < str.length(); i++){
			  if ( to_delete != i )
				  System.out.print(str.charAt(i));
	      }
	   }
}
}


import java.io.*;
import java.util.*;
public class MinimizeTheString
{
	public static void main(String args[])throws IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(System.out);

		int N = Integer.parseInt(br.readLine().trim());
		String st = br.readLine();

		if(N == 1)
		{
			pw.println(st);
		}
		else
		{
			int max = (int)st.charAt(0);
			int maxIndex = 0;
			for(int i = 1 ; i < N ; i++)
			{
		//		System.out.println("CharAt "+ i +" "+(int)st.charAt(i));
				if(st.charAt(i) > max)
				{

					max = (int)st.charAt(i);
					maxIndex = i;
			/*		System.out.println("Hello MAX==>" + max);
					System.out.println("Hello MAXIndex==>" + maxIndex);*/
				}
			}
			StringBuilder sbr = new StringBuilder();
			for(int i = 0 ; i < N ; i++)
			{
				if(i == maxIndex)
				{
					continue;
				}
				sbr.append(new StringBuilder(Character.toString(st.charAt(i))));
			}
			pw.println(sbr);
		}
		pw.close();
	}
}


import java.io.*;
import java.util.*;
public class MinimizeTheString
{
	public static void main(String args[])throws IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(System.out);

		int N = Integer.parseInt(br.readLine().trim());
		String st = br.readLine();

		if(N == 1)
		{
			pw.println();
		}
		else
		{
			int max = (int)st.charAt(0);
			int maxIndex = 0;
			for(int i = 1 ; i < N ; i++)
			{
		//		System.out.println("CharAt "+ i +" "+(int)st.charAt(i));
				if(st.charAt(i) > max)
				{

					max = (int)st.charAt(i);
					maxIndex = i;
			/*		System.out.println("Hello MAX==>" + max);
					System.out.println("Hello MAXIndex==>" + maxIndex);*/
				}
			}
			for(int i = 0 ; i < N - 1 ; i++)
			{
				if(st.charAt(i) > st.charAt(i + 1))
				{
					maxIndex = i;
					break;
				}
			}
			StringBuilder sbr = new StringBuilder();
			for(int i = 0 ; i < N ; i++)
			{
				if(i == maxIndex)
				{
					continue;
				}
				sbr.append(new StringBuilder(Character.toString(st.charAt(i))));
			}
			pw.println(sbr);
		}
		pw.close();
	}
}


import java.io.*;
import java.util.*;
public class MinimizeTheString
{
	public static void main(String args[])throws IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(System.out);

		int N = Integer.parseInt(br.readLine().trim());
		String st = br.readLine();

		if(N == 1)
		{
			pw.println(st);
		}
		else
		{
			char max = st.charAt(0);
			int maxIndex = 0;
			for(int i = 1 ; i < N ; i++)
			{
				if(st.charAt(i) > max)
				{
					max = st.charAt(i);
					maxIndex = i;
				}
			}
			StringBuilder sbr = new StringBuilder();
			for(int i = 0 ; i < N ; i++)
			{
				if(i == maxIndex)
				{
					continue;
				}
				sbr.append(new StringBuilder(Character.toString(st.charAt(i))));
			}
			pw.println(sbr);
		}
		pw.close();
	}
}


import java.io.*;
import java.util.*;
public class MinimizeTheString
{
	public static void main(String args[])throws IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(System.out);

		int N = Integer.parseInt(br.readLine().trim());
		String st = br.readLine();

		if(N == 1)
		{
			pw.println();
		}
		else
		{
			int max = (int)st.charAt(0);
			int maxIndex = 0;
			for(int i = 1 ; i < N ; i++)
			{
		//		System.out.println("CharAt "+ i +" "+(int)st.charAt(i));
				if(st.charAt(i) > max)
				{

					max = (int)st.charAt(i);
					maxIndex = i;
			/*		System.out.println("Hello MAX==>" + max);
					System.out.println("Hello MAXIndex==>" + maxIndex);*/
				}
			}
			StringBuilder sbr = new StringBuilder();
			for(int i = 0 ; i < N ; i++)
			{
				if(i == maxIndex)
				{
					continue;
				}
				sbr.append(new StringBuilder(Character.toString(st.charAt(i))));
			}
			pw.println(sbr);
		}
		pw.close();
	}
}


#include <stdio.h>

long long int six[14], three[19];

int main(){
	int n, j;
	long long int num;
	six[0] = 1;
	int flag = 0;
	for(int i = 0; i < 13; i ++)
		six[i + 1] = six[i] * 6;
	three[0] = 1;
	for(int i = 0; i < 18; i ++)
		three[i + 1] = three[i] * 3;
	scanf("%d", &n);
	for(int i = 0; i < n; i ++){
		scanf("%lld", &num);
		if(num == 1)
			printf("0\n");
		else if(num == 3)
			printf("2\n");
		else{
			flag = 0;
			for(j = 0; j < 14; j ++){
				for(int k = 0; k < 19; k ++){
					if(six[j] * three[k] == num){
						flag = k;
						break;
					}
					else if(six[j] * three[k] > num)
						break;
				}
				if(flag != 0)
					break;
			}
			if(flag == 0)
				printf("-1\n");
			else
				printf("%d\n", j + 2 * flag);
		}
	}
	return 0;
}


#include <stdio.h>
#define max 1000000000

int count[max];

int main(){
	int n, num, tmp = 3;
	count[1] = 0;
	count[3] = 2;
	while((tmp * 3) <= max){
		count[tmp * 3] = count[tmp] + 2;
		count[tmp * 2] = count[tmp] - 1;
		tmp *= 3;
	}
	//printf("%d %d", count[3], count[12345]);
	scanf("%d", &n);
	for(int i = 0; i < n; i ++){
		scanf("%d", &num);
		if(count[num] == 0 && num != 1)
			printf("-1\n");
		else
			printf("%d\n", count[num]);
	}
	return 0;
}


#include <stdio.h>

long long int six[14], three[19];

int main(){
	int n, j;
	long long int num;
	six[0] = 1;
	int flag = 0;
	for(int i = 0; i < 13; i ++)
		six[i + 1] = six[i] * 6;
	three[0] = 1;
	for(int i = 0; i < 18; i ++)
		three[i + 1] = three[i] * 3;
	scanf("%d", &n);
	for(int i = 0; i < n; i ++){
		scanf("%lld", &num);
		if(num == 1)
			printf("0\n");
		else if(num == 3)
			printf("2\n");
		else{
			flag = 0;
			for(j = 0; j < 14; j ++){
				for(int k = 0; k < 19; k ++){
					if(six[j] * three[k] == num){
						flag = k + 1;
						break;
					}
					else if(six[j] * three[k] > num)
						break;
				}
				if(flag != 0)
					break;
			}
			if(flag == 0)
				printf("-1\n");
			else
				printf("%d\n", j + 2 * (flag - 1));
		}
	}
	return 0;
}


#include<stdio.h>
int main()
{
    int t;
    scanf("%d",&t);
    for(t=t;;t--)

    {
        int n,count=0;
        scanf("%d",&n);
    for(n=n;n>1;)
    {
        if(n%6==0)
           {
               n=n/6;
           }
        else
            {
                n=n*2;
                if(n%6!=0)
                    {
                        count=-1;
                        break;
                    }
            }
            count=count+1;
    }
    printf("%d",count);
    printf("\n");
    }
    return 0;
}


#include<stdio.h>
int main()
{
    int t;
    scanf("%d",&t);
    for(t=t;t>0;t--)

    {
        int n,count=0;
        scanf("%d",&n);
    for(n=n;n>1;)
    {
        if(n%6==0)
           {
               n=n/6;
           }
        else
            {
                n=n*2;
                if(n%6!=0)
                    {
                        count=-1;
                        break;
                    }
            }
            count=count+1;
    }
    printf("%d",count);
    printf("\n");
    }
    return 0;
}


#include"stdio.h"
#include"conio.h"

int main()
{

    int t,c,n;
    scanf("%d",&t);
    while(t--)
    {
        c=0;
        scanf("%d",&n);
        while(n!=1)
        {
            if(n%6==0)
            {
                c+=1;
                n=n/6;
            }
            else
            {
                if(n%3==0)
                {

                c+=1;
                n=n*2;}
                else
                {

                    printf("-1\n");
                    break;
                }

            }
        }printf("%d\n",c);
    }
}


#include"stdio.h"
#include"conio.h"

int main()
{

    int t,c,n;
    scanf("%d",&t);
    while(t--)
    {
        c=0;
        scanf("%d",&n);
        while(n!=1)
        {
            if(n%6==0)
            {
                c+=1;
                n=n/6;
            }
            else
            {
                if(n%3==0)
                {

                c+=1;
                n=n*2;}
                else
                {

                    printf("-1\n");
                    c=-1;
                    break;
                }

            }
        }if(c>-1)
        printf("%d\n",c);
    }
}


#include<stdio.h>
#include<math.h>
#include<malloc.h>
int main()
{
    int rem,cases,k=2,z,count3=0,count2=0,num;
    //long double x,n;
    int *arr;int i;
    scanf("%d",&cases);
    arr=(int*)malloc(cases*sizeof(int));
    for(i=0;i<cases;i++)
    {
        scanf("%d",&arr[i]);
    }
    for(i=0;i<cases;i++)
    {
        num=arr[i];count2=0,count3=0;
        while(num%3==0)
        {
            num=num/3;
            count3++;
        }
        while(num%2==0)
        {
            num=num/2;
            count2++;
        }
        //printf("count2=%ld\t%ld\n",count2,count3);
        if(num!=1||count2>count3)
        printf("-1\n");
        //if(count2>count3)
        //printf("-1\n");
        else
        printf("%d\n",(count3-count2)+count3);

    }
    return 0;
}


#include<stdio.h>
#include<math.h>
#include<malloc.h>
int main()
{
    long int rem,cases,k=2,z,count3=0,count2=0,num;
    //long double x,n;
    long int *arr;int i;
    scanf("%ld",&cases);
    arr=(long int*)malloc(sizeof(long int));
    for(i=0;i<cases;i++)
    {
        scanf("%ld",&arr[i]);
    }
    for(i=0;i<cases;i++)
    {
        num=arr[i];count2=0,count3=0;
        while(num%3==0)
        {
            num=num/3;
            count3++;
        }
        while(num%2==0)
        {
            num=num/2;
            count2++;
        }
        //printf("count2=%ld\t%ld\n",count2,count3);
        if(num!=1||count2>count3)
        printf("-1\n");
        //if(count2>count3)
        //printf("-1\n");
        else
        printf("%ld\n",(count3-count2)+count3);
    }
}


let inputString = "";
let currentLine = 0;
process.stdin.on("data", (inputStd) => {
  inputString += inputStd;
});
process.stdin.on("end", function () {
  inputString = inputString
    .trim()
    .split("\n")
    .map((str) => str.trim());
  main();
});
function readLine() {
  return inputString[currentLine++];
}
function main() {
  let t = +readLine();
  while (t--) {
    let n = +readLine();
    let count = 0;

    while (n > 1 && n < Number.MAX_SAFE_INTEGER) {
      if (n % 6 === 0) {
        while (n % 6 === 0) {
          n /= 6;
          count++;
        }
      } else {
        n *= 2;
        count++;
      }
    }
    if (n === 1) console.log(count);
    else console.log(-1);
  }
}


//↓見なくていいよ！ここから--------------------------------------------------
var read = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
var obj;
var inLine = [];
read.on('line', function(input){inLine.push(input);});
read.on('close', function(){
  obj = init(inLine);
  console.error("\n");
  var start = new Date();
  Main();
  var end = new Date() - start;

  myerr("time : " + (end) + "ms");
  myerr("memory : " + Math.round(process.memoryUsage().heapTotal / 1024) + "KB");
});
function nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}
function nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}
function next(){return obj.next();} function hasNext(){return obj.hasNext();}
function init(input){
  var returnObj = {
    list : input, index : 0, max : input.length,
    hasNext : function(){return (this.index < this.max);},
    next : function(){if(!this.hasNext()){throw "ArrayIndexOutOfBoundsException これ以上ないよ";}else{var returnInput = this.list[this.index];this.index++;return returnInput;}}
  };
  return returnObj;
}
function myout(s){console.log(s);}
function myerr(s){console.error("debug:" + require("util").inspect(s,false,null));}
//[no]要素の扱い。数値型
//不明値、異常時:引数そのまま返す 1:数値へ変換
//2:半角SPで分割 4:半角SPで分割し、数値配列へ
//6:1文字で分割  7:1文字で分割し、数値配列へ
//8:半角SPで結合 9:改行で結合 0:文字なしで結合
function myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(" ");case 4:return i.split(" ").map(Number);case 6:return i.split("");case 7:return i.split("").map(Number);case 8:return i.join(" ");case 9:return i.join("\n");case 0:return i.join("");default:return i;}}catch(e){return i;}}

//↑見なくていいよ！ここまで--------------------------------------------------
function Main(){
	var t = nextInt();
	var output = new Array(t);
	for(var i = 0; i < t; i++){
		var n = nextInt();
		if(n == 1){
			output[i] = 0;
			continue;
		}
		var map = getPrimeFactorization(n);
		if(map[3] == null){
			output[i] = -1;
			continue;
		}
		var count = 0;
		if(map[2] == null){
			count = map[3] * 2;
		}else if(map[3] >= map[2]){
			count = map[2];
			count += (map[3] - map[2]) * 2;
		}else{
			output[i] = -1;
			continue;
		}
		var keys = Object.keys(map);
		for(var j = 0; j < keys.length; j++){
			if(keys[j] != 3 && keys[j] != 2){
				output[i] = -1;
				break;
			}
		}
		if(output[i] == null){
			output[i] = count;
		}
	}
	myout(myconv(output,9));
}
function getPrimeFactorization(val){
  var primeMap = {};
  var div = 2;
  while(val != 1){
    if(val % div == 0){
      var count = 2;
      while(val % Math.pow(div, count) == 0){
         count++;
      }
      (primeMap[div] == null)  ? primeMap[div] = (count - 1) : primeMap[div] += (count - 1);
      val /= Math.pow(div, count - 1);
      if(isPrime(val)){
        (primeMap[val] == null)  ? primeMap[val] = 1 : primeMap[val]++;
        break;
      }
    }
    div = (div == 2) ? div + 1 : div + 2;
  }
  return primeMap;
}
function isPrime(val){
  if(val == null || val <= 1 || (val != 2 && val % 2 == 0)){
    return false;
  }else if(val == 2){
    return true;
  }
  var root = Math.floor(Math.sqrt(val));
  for(var i = 3; i <= root; i += 2){
    if(val % i == 0){
      return false;
    }
  }
  return true;
}


//↓見なくていいよ！ここから--------------------------------------------------
var read = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
var obj;
var inLine = [];
read.on('line', function(input){inLine.push(input);});
read.on('close', function(){
  obj = init(inLine);
  console.error("\n");
  var start = new Date();
  Main();
  var end = new Date() - start;

  myerr("time : " + (end) + "ms");
  myerr("memory : " + Math.round(process.memoryUsage().heapTotal / 1024) + "KB");
});
function nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}
function nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}
function next(){return obj.next();} function hasNext(){return obj.hasNext();}
function init(input){
  var returnObj = {
    list : input, index : 0, max : input.length,
    hasNext : function(){return (this.index < this.max);},
    next : function(){if(!this.hasNext()){throw "ArrayIndexOutOfBoundsException これ以上ないよ";}else{var returnInput = this.list[this.index];this.index++;return returnInput;}}
  };
  return returnObj;
}
function myout(s){console.log(s);}
function myerr(s){console.error("debug:" + require("util").inspect(s,false,null));}
//[no]要素の扱い。数値型
//不明値、異常時:引数そのまま返す 1:数値へ変換
//2:半角SPで分割 4:半角SPで分割し、数値配列へ
//6:1文字で分割  7:1文字で分割し、数値配列へ
//8:半角SPで結合 9:改行で結合 0:文字なしで結合
function myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(" ");case 4:return i.split(" ").map(Number);case 6:return i.split("");case 7:return i.split("").map(Number);case 8:return i.join(" ");case 9:return i.join("\n");case 0:return i.join("");default:return i;}}catch(e){return i;}}

//↑見なくていいよ！ここまで--------------------------------------------------
function Main(){
	var t = nextInt();
	var output = new Array(t);
	for(var i = 0; i < t; i++){
		var n = nextInt();
		if(n == 1){
			output[i] = 0;
			continue;
		}
		var two = 0;
		var three = 0;
		while(n % 3 == 0){
			n /= 3;
			three++;
		}
		while(n % 2 == 0){
			n /= 2;
			two++;
		}
		if(n != 1){
			output[i] = -1;
		}else{
			if(three >= two){
				output[i] = two + (three - two) * 2;
			}else{
				output[i] = -1;
			}
		}
	}
	myout(myconv(output,9));
}
function getPrimeFactorization(val){
  var primeMap = {};
  var div = 2;
  while(val != 1){
    if(val % div == 0){
      var count = 2;
      while(val % Math.pow(div, count) == 0){
         count++;
      }
      (primeMap[div] == null)  ? primeMap[div] = (count - 1) : primeMap[div] += (count - 1);
      val /= Math.pow(div, count - 1);
      if(isPrime(val)){
        (primeMap[val] == null)  ? primeMap[val] = 1 : primeMap[val]++;
        break;
      }
    }
    div = (div == 2) ? div + 1 : div + 2;
  }
  return primeMap;
}
function isPrime(val){
  if(val == null || val <= 1 || (val != 2 && val % 2 == 0)){
    return false;
  }else if(val == 2){
    return true;
  }
  var root = Math.floor(Math.sqrt(val));
  for(var i = 3; i <= root; i += 2){
    if(val % i == 0){
      return false;
    }
  }
  return true;
}


process.stdin.resume();
process.stdin.setEncoding('utf-8');

let stdinInput = '';

process.stdin.on('data', input => {
  stdinInput += input;
});

process.stdin.on('end', () => {
  main(stdinInput);
});

function main(data) {
    data = data.split('\n');
    const testCases = data[0] * 1;
    let i = 1;
    while (i <= testCases) {
      let n = +data[i];
      let check = false;
      let count = 0;
      while (true) {
        const mod = n % 6;
        if (n === 1) {
          console.log(count);
          break;
        } else if (mod && check) {
          console.log(-1);
          break;
        } else if (!mod) {
          n /= 6;
          check = false;
        }
        else {
          n *= 2;
          check = true;
        }
        count += 1;
      }
      i += 1;
    }
  }


const readline = require('readline');
const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
  terminal: false
});
let c = 0;
let ans = '';

rl.on('line', (d) => {
  if (c === 0) {
    c++;
    return;
  }

  let n = BigInt(d);

  if (n === 1n) {
    ans += '0\n';
  }
  else {
    let test = 0;
    for (let i = 0; i < 1000; i++) {
      if (n % 6n === 0n) {
        n = n / 6n;
      }
      else {
        n = n * 2n;
      }

      if (n === 1n) {
        test = i + 1;
        break;
      }
    }

    if (test) {
      ans += `${test}\n`;
    }
    else {
      ans += `-1\n`;
    }
  }

  c++;
});

rl.on('close', () => {
  console.log(ans);
});


const readline = require('readline');
const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
  terminal: false
});
let c = 0;

rl.on('line', (d) => {
  if (c === 0) {
    c++;
    return;
  }

  let n = BigInt(d);
  let ans = 0;

  if (n === 1n) {
    console.log(0);
    return;
  }

  for (let i = 0; i < 1000; i++) {
    if (n % 6n === 0n) {
      n = n / 6n;
    }
    else {
      n = n * 2n;
    }

    if (n === 1n) {
      ans = i + 1;
      break;
    }
  }

  if (ans) {
    console.log(ans);
  }
  else {
    console.log(-1);
  }

  c++;
});

rl.on('close', () => {

});


const readline = require('readline');
const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
  terminal: false
});
let c = 0;
let ans = '';

rl.on('line', (d) => {
  if (c === 0) {
    c++;
    return;
  }

  let n = BigInt(d);

  if (n === 1n) {
    ans += '0\n';
  }
  else {
    let test = 0;
    for (let i = 0; i < 50; i++) {
      if (n % 6n === 0n) {
        n = n / 6n;
      }
      else {
        n = n * 2n;
      }

      if (n === 1n) {
        test = i + 1;
        break;
      }
    }

    if (test) {
      ans += `${test}\n`;
    }
    else {
      ans += `-1\n`;
    }
  }

  c++;
});

rl.on('close', () => {
  console.log(ans);
});


process.stdin.resume();
process.stdin.setEncoding('utf-8');

let inputString = '';
let currentLine = 0;

process.stdin.on('data', inputStdin => {
    inputString += inputStdin;
});

process.stdin.on('end', _ => {
    inputString = inputString.trim().split('\n').map(string => {
        return string.trim();
    });

    main();
});

function readline() {
    return inputString[currentLine++];
}

function main() {
    function solve(x, moves) {
        console.log(x);
        if (x === 1) { return moves; }
        else if (x%2 === 1) { return solve(2*x, moves+1); }
        else if (x%6 === 0) { return solve(Math.floor(x/6), moves+1); }
        else { return -1; }
    }
    const testCases = parseInt(readline());
    for (var i=0; i<testCases; i++) {
        const x = parseInt(readline());
        console.log(solve(x, 0));
    }
}


process.stdin.resume();
process.stdin.setEncoding('utf-8');

let inputString = '';
let currentLine = 0;

process.stdin.on('data', inputStdin => {
    inputString += inputStdin;
});

process.stdin.on('end', _ => {
    inputString = inputString.trim().split('\n').map(string => {
        return string.trim();
    });

    main();
});

function readline() {
    return inputString[currentLine++];
}

function main() {
    function solve(x, moves) {
        if (x === 1) { return moves; }
        else if (x%2 === 1) { return solve(2*x, moves+1); }
        else if (x%6 === 0) { return solve(Math.floor(x/6), moves+1); }
        else { return -1; }
    }
    const testCases = parseInt(readline());
    for (var i=0; i<testCases; i++) {
        const x = parseInt(readline());
        console.log(solve(x, 0));
    }
}


const readline = require('readline');

const rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout
});

var lineCount = 0
var testCount = 0
var outputStr = ''

rl.on('line', (input) => {
    if (lineCount == 0) {
        // first line
        testCount = parseInt(input)
    }
    else if (lineCount >= testCount) {
        outputStr += compute(input) + '\n'
        console.log(outputStr)
        rl.close()
    }
    else {
        // data
        outputStr += compute(input) + '\n'
    }
    lineCount++
});

function compute(str) {
    var n = parseInt(str)
    var temp = n
    var timesOfTwo = 0
    var timesOfThree = 0
    while(temp%2==0){
        temp = temp / 2
        timesOfTwo+=1
    }
    while(temp%3==0){
        temp = temp / 3
        timesOfThree+=1
    }
    // console.log(timesOfTwo, timesOfThree)
    if(temp==1&&timesOfTwo<=timesOfThree){
        return timesOfThree*2 - timesOfTwo
    }
    else return -1
}


using System;

namespace _1374B_MultiplyBy2DivideBy6
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = Convert.ToInt32(Console.ReadLine());
            int[] results = new int[n];

            for(int i = 0; i < n; i++)
            {
                int number = Convert.ToInt32(Console.ReadLine());

                int s1 = 0;
                int s2 = 0;

                while(number%2 == 0)
                {
                    s1++;
                    number /= 2;
                }

                while(number%3 == 0)
                {
                    s2++;
                    number /= 3;
                }

                if(n == 1)
                {
                    if(s1 <= s2)
                    {
                        int answer = Math.Min(s1, s2);
                        s1 -= answer;
                        s2 -= answer;
                        answer += s2 * 2;
                        results[i] = answer;
                    }
                    else
                    {
                        results[i] = -1;
                    }
                }
                else
                {
                    results[i] = -1;
                }

            }

            for(int i = 0; i < n; i++)
            {
                Console.WriteLine(results[i]);
            }

        }
    }
}


using System;

namespace _1374B_MultiplyBy2DivideBy6
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = Convert.ToInt32(Console.ReadLine());
            int[] results = new int[n];

            for(int i = 0; i < n; i++)
            {
                int number = Convert.ToInt32(Console.ReadLine());

                int s1 = 0;
                int s2 = 0;

                while(number%2 == 0)
                {
                    s1++;
                    number /= 2;
                }

                while(number%3 == 0)
                {
                    s2++;
                    number /= 3;
                }

                if(number == 1)
                {
                    if(s1 <= s2)
                    {
                        int answer = Math.Min(s1, s2);
                        s1 -= answer;
                        s2 -= answer;
                        answer += s2 * 2;
                        results[i] = answer;
                    }
                    else
                    {
                        results[i] = -1;
                    }
                }
                else
                {
                    results[i] = -1;
                }

            }

            for(int i = 0; i < n; i++)
            {
                Console.WriteLine(results[i]);
            }

        }
    }
}


using System;

namespace _1374B_MultiplyBy2DivideBy6
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = Convert.ToInt32(Console.ReadLine());
            int[] results = new int[n];

            for(int i = 0; i < n; i++)
            {
                int number = Convert.ToInt32(Console.ReadLine());

                int s1 = 0;
                int s2 = 0;

                while(number%2 == 0)
                {
                    s1++;
                    number = number / 2;
                }

                while(number%3 == 0)
                {
                    s2++;
                    number = number / 2;
                }

                if(n == 1)
                {
                    if(s1 <= s2)
                    {
                        int answer = Math.Min(s1, s2);
                        s1 -= answer;
                        s2 -= answer;
                        answer += s2 * 2;
                        results[i] = answer;
                    }
                    else
                    {
                        results[i] = -1;
                    }
                }
                else
                {
                    results[i] = -1;
                }

            }

            for(int i = 0; i < n; i++)
            {
                Console.WriteLine(results[i]);
            }

        }
    }
}