// http://codeforces.com/problemset/problem/426/B

#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>

short n, m;  // n -> rows & m -> columns
short minRows;

void cheak( unsigned long long arr[n][2] )
{
    short i;
    bool flag;

    if( minRows % 2 == 1 )
    {
        return;
    }

    flag = 1;
    for( i = 0; i < minRows / 2; i++ )
    {
        if( arr[i][0] != arr[ minRows - i - 1 ][0] ||
            arr[i][1] != arr[ minRows - i - 1 ][1] )
        {
            flag = 0;
            break;
        }
    }

    if( flag == 1 )
    {
        minRows /= 2;

        cheak( arr );
    }

    return;
}

int main( void )
{
    short i, j;
    short first, second;
    short temp;

    scanf( "%hi %hi", &n, &m );

    if( n % 2 == 1 )
    {
        printf( "%hi\n", n );
        return 0;
    }

    unsigned long long arr[n][2];

    if( m <= 64 )
    {
        first = m;
    }
    else
    {
        first = 64;
    }

    second = m - 64;

    for( i = 0; i < n; i++ )
    {
        arr[i][0] = 0;

        for( j = 0; j < first; j++ )
        {
            scanf( "%hi", &temp );

            if( temp == 1 )
            {
                arr[i][0] |= ( 1 << j );
            }
        }

        arr[i][1] = 0;

        for( j = 0; j < second; j++ )
        {
            scanf( "%hi", &temp );

            if( temp == 1 )
            {
                arr[i][1] |= ( 1 << j );
            }
        }
    }

    /*for( i = 0; i < n; i++ )
    {
        printf( "%I64 %I64\n", arr[i][0], arr[i][1] );
    }*/

    minRows = n;
    cheak( arr );

    printf( "%hi\n", minRows );

    return 0;
}


// http://codeforces.com/problemset/problem/426/B

#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>

short n, m;  // n -> rows & m -> columns
short minRows;

void cheak( unsigned long long arr[n][2] )
{
    short i;
    bool flag;

    if( minRows % 2 == 1 )
    {
        return;
    }

    flag = 1;
    for( i = 0; i < minRows / 2; i++ )
    {
        if( arr[i][0] != arr[ minRows - i - 1 ][0] ||
            arr[i][1] != arr[ minRows - i - 1 ][1] )
        {
            flag = 0;
            break;
        }
    }

    if( flag == 1 )
    {
        minRows /= 2;

        cheak( arr );
    }

    return;
}

int main( void )
{
    short i, j;
    short first, second;
    short temp;

    scanf( "%hi %hi", &n, &m );

    unsigned long long arr[n][2];

    if( m <= 64 )
    {
        first = m;
    }
    else
    {
        first = 64;
    }

    second = m - 64;

    for( i = 0; i < n; i++ )
    {
        arr[i][0] = 0;

        for( j = 0; j < first; j++ )
        {
            scanf( "%hi", &temp );

            if( temp == 1 )
            {
                arr[i][0] |= ( 1 << j );
            }
        }

        arr[i][1] = 0;

        for( j = 0; j < second; j++ )
        {
            scanf( "%hi", &temp );

            if( temp == 1 )
            {
                arr[i][1] |= ( 1 << j );
            }
        }
    }

    /*for( i = 0; i < n; i++ )
    {
        printf( "%I64 %I64\n", arr[i][0], arr[i][1] );
    }*/

    minRows = n;
    cheak( arr );

    printf( "%hi\n", minRows );

    return 0;
}


#include<stdio.h>
#include<stdlib.h>
//int m;
int flag=0;
int chek(int n,int m,int a[n][m]){
	int i,j,k;
	for(i=0;i<n/2;i++){
		for(j=0;j<m;j++){
			if(a[i][j]!=a[n-i-1][j]){
				flag=1;
				break;
				}}}
	if(flag==0){
		return 1;
			}
	else{
		return 0;
}}

int main(){
int i,j,n,m;
//m=(int *)malloc(sizeof(int));
scanf("%d %d",&n,&m);
int a[n][m];
for(i=0;i<n;i++){
	for(j=0;j<m;j++){
		scanf("%d",&a[i][j]);
}}
if(n%2==1){
printf("%d\n",n);
return 0;
}
else{
	while(chek(n,m,a)==1){
		n=n/2;
		}}
printf("%d\n",n);
return 0;
}


#include<stdio.h>
#include<stdlib.h>
//int m;
int flag=0;
int main(){
int i,j,n,m;
scanf("%d %d",&n,&m);
int a[n][m];
for(i=0;i<n;i++){
	for(j=0;j<m;j++){
		scanf("%d",&a[i][j]);
}}
while(1){
if(n%2==1){
printf("%d\n",n);
return 0;
}
else{
	        for(i=0;i<n/2;i++){
                	for(j=0;j<m;j++){
                        	if(a[i][j]!=a[n-i-1][j]){
                                	flag=1;
                                	break;
                                }}}
	        if(flag==0){
                	   n=n/2;
                           }
        	else{
                	printf("%d\n",n);
	                return 0;

		}}}}


/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * File:   main.c
 * Author: alulab14
 *
 * Created on 13 de mayo de 2017, 12:34 PM
 */

#include <stdio.h>
#include <stdlib.h>
#define N 100
/*
 *
 */
int es_mirror(int M[N][N], int x, int y){
    int med= x/2;
    int i,j;
    for(i=0; i<med; i++)
    {
        for(j=0; j<y; j++)
        {
            if(M[i][j] != M[x-1-i][j])
                return 0;
        }
    }
    return 1;
}

int solucion(int M[N][N], int x, int y){
    if(x%2==0)
    {
        if(es_mirror(M, x, y))
            return solucion(M, x/2, y);
        else
            return x;
    }
    return x;
}

int main(int argc, char** argv) {
    int x, y;

    scanf("%d %d", &x, &y);
    int M[N][N];

    int i,j;
    for(i=0; i<x; i++)
        for(j=0; j<y; j++)
            scanf("%d", &M[i][j]);

    int sol = solucion(M, x, y);
    printf("%d\n", sol);
    return (EXIT_SUCCESS);
}


/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * File:   main.c
 * Author: alulab14
 *
 * Created on 13 de mayo de 2017, 12:34 PM
 */

#include <stdio.h>
#include <stdlib.h>
#define N 100
/*
 *
 */

int es_mirror(int M[N][N], int x, int y){
    int med= x/2;
    int i,j;
    for(i=0; i<med; i++)
    {
        for(j=0; j<y; j++)
        {
            if(M[i][j] != M[x-1-i][j])
                return 0;
        }
    }
    return 1;
}

int solucion(int M[N][N], int x, int y){
    if(x%2==0)
    {
        if(es_mirror(M, x, y))
            return solucion(M, x/2, y);
        else
            return x;
    }
    return x;
}

int main(int argc, char** argv) {
    int x, y;

    scanf("%d %d", &x, &y);
    int M[N][N];

    int i,j;
    for(i=0; i<x; i++)
        for(j=0; j<y; j++)
            scanf("%d", &M[i][j]);

    int sol = solucion(M, x, y);
    printf("%d\n", sol);
    return (EXIT_SUCCESS);
}


#include <stdio.h>

int Mat[100][100];
int M;

int Judge(int N)
{
    int i, j, k;
    for(i=0, j=N-1; i<(N>>1); ++i, --j)
    {
        for(k=0; k<M; ++k)
        {
            if(Mat[i][k] != Mat[j][k])
            {
                return 0;
            }
        }
    }
    return 1;
}

int main()
{
    int N, i, j;
    scanf("%d %d", &N, &M);
    for(i=0; i<N; ++i)
    {
        for(j=0; j<M; ++j)
        {
            scanf("%d", &Mat[i][j]);
        }
    }
    while(1)
    {
        if(N & 1)
        {
            printf("%d\n", N);
            return 0;
        }
        if(Judge(N))
        {
            N >>= 1;
        }
        else
        {
            printf("%d\n", N);
            return 0;
        }
    }
    return 0;
}


#include <stdio.h>

int n,m;
int main()
{
    int i,j,a;
    int jz[100][100];
    int judege(int [][100]);
    scanf("%d%d",&n,&m);
    for(i=0;i<n;i++)
    {
        for(j=0;j<m;j++)
            scanf("%d",&jz[i][j]);
    }
    for(;;)
    {
        a = judege(jz);
        if(a==0)
            break;
    }
    printf("%d",n);
    return 0;
}
int judege(int sz[][100])
{
    int k,v;
    if(n%2==1)
        return 0;
    else
    {
        n = n/2;
        for(v=0;v<n;v++){
        for(k=0;k<m;k++)
        {
            if(sz[n-1-v][k]!=sz[n+v][k])
                {n = n * 2;return 0;}
        }}
        return 1;
    }
}


#include<stdio.h>

int main()
{
    int m,n,i,a[1000],t,j;
    while(scanf("%d%d",&n,&m)!=EOF){
        memset(a,0,sizeof(a));
        for(i=0;i<n;i++){
            for(j=0;j<m;j++){
                scanf("%d",&t);
                if(t==0)
                    a[i]=a[i]<<1;
                else
                    a[i]=(a[i]<<1)+1;
            }
        }
            int l=0,r=n-1;
            while(l<=r){
                int mid=(l+r)>>1;int flag=(r+1)%2;
               // printf("%d %d %d %d",l,mid,r,flag);system("pause");
                if(flag){
                    printf("%d\n",r+1);break;
                }
                int ans=1;
                for(i=0;i<=mid;i++){
                    if(a[i]!=a[r-i]){
                      //  printf("%d %d %d %d",i,a[i],i+mid+1,a[i+mid+1]);system("pause");
                        printf("%d\n",r+1);ans=0;break;
                    }
                }
                if(!ans)break;
                r=mid;
            }
        }
    return 0;
}


#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int check(char **a,int n)
{
    if(n%2==1)
    {
    //  printf("one\n");
        return n;
    }
    else
    {
        int i=0,j=n-1;
        while(i<j)
        {
            if(strcmp(&a[i][0],&a[j][0])!=0)
             {
                //printf("two");
                return n;}
            i++;
            j--;
        }
        return check(a,n/2);
    }
}
int main()
{
    int n,m,i,j;
    scanf("%d %d",&n,&m);
    getchar();
    char **a,c;
    a=(char **)malloc(sizeof(char *)*n);
    for(i=0;i<n;i++)
    {
        a[i]=(char *)malloc(sizeof(char)*m);
        c=getchar();
        j=0;
        while(c!='\n')
        {
            if(c!=' ')
            {   a[i][j]=c;
                j++;
            }
            c=getchar();
        }
        a[i][j]='\0';
    }

    printf("%d\n",check(a,n));
    //for(i=0;i<n;i++)
//  {
//      printf("%s\n",a[i]);
//  }
    free(a);
    return 0;
}


#include <stdio.h>
int a[100][100];

int s(int * n,int m){
	if(*n%2)return 0;
	int l=0,g=*n-1,x;
	while(l<g){
		for(x=0;x<m;x++)
			if(a[l][x]!=a[g][x])return 0;
		l++,g--;
	}
	*n/=2;
	return 1;
}
int main(){
	int n,m;
	scanf("%d%d",&n,&m);
	int y,x;
	for(y=0;y<n;y++){
		for(x=0;x<m;x++)
			scanf("%d",&a[y][x]);
	}
	while(s(&n,m));
	printf("%d",n);
	return 0;
}


#include <stdio.h>
#include <string.h>
int main()
{
    int n,m,i,j,flag,ans;
    int a[105][105];
    scanf("%d %d",&n,&m);
    memset(a,0,sizeof(a));
    for (i=1;i<=n;i++)
      for (j=1;j<=m;j++)
        scanf("%d",&a[i][j]);
    ans=n;
    do
    {
        if (ans%2==1) break;
        ans=ans/2;
        flag=1;
        for (i=1;i<=ans;i++)
        {
            for (j=1;j<=m;j++)
             if (a[i][j]!=a[ans*2+1-i][j]) { flag=0;break; }
        }
        if (flag==0) {  ans=ans*2;break; }
    }while(1);
    printf("%d",ans);
    return 0;
}


#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include<ctype.h>
#include<string.h>

int main()
{
    int n,m;
    scanf("%d%d",&n,&m);
    int arr[n][m],i,j;
    for(i=0;i<n;i++)
        for(j=0;j<m;j++)
            scanf("%d",&arr[i][j]);
    if(n%2!=0)
        printf("%d\n",n);
    else{
        int rows=n/2,flag=1;
        while(1){
            for(i=0;i<rows;i++){
                for(j=0;j<m;j++){
                    if(arr[i][j]!=arr[(rows*2)-i-1][j])
                        flag=0;
                }
            }
            if(flag && rows%2==0)
                rows/=2;
            else
                break;
        }
        if(rows%2==0)
            printf("%d\n",rows*2);
        else if(rows%2!=0 && flag)
            printf("%d\n",rows);
        else if(!flag)
            printf("%d\n",rows*2);

    }
    return 0;
}


#include <stdio.h>
int ar[102][102];
void call(int n,int m)
{
    if(n&1)
    {   printf("%d",n);
        return;
    }
    int p=0,i,j;
    for(i=0;i<n/2;i++)
    {
        for(j=0;j<m;j++)
        {
            if(ar[i][j]!=ar[n-i-1][j])
            {
                p=-1;
                break;
            }
        }
        if(p==-1)
            break;
    }
    if(p==-1)
        printf("%d",n);
    else
        call(n/2,m);
}
int main(void) {
    int n,m,i,j;
    scanf("%d %d",&n,&m);
    for(i=0;i<n;i++)
        for(j=0;j<m;j++)
            scanf("%d",&ar[i][j]);
    call(n,m);
    return 0;
}


#include<stdio.h>
	int matrix[101][101];

int check(int a[],int b[],int length)
{
	int i;
	for(i=0;i<length;i++)
	{
		if(a[i]!=b[i])
			return 0;
	}
	return 1;
}
int fun(int start,int length,int columns)
{
	int i;
	if(length%2)
		return 0;
	for(i=0;i<length/2;i++)
	{
		if(!check(matrix[i],matrix[length-1-i],columns))
			return 0;
	}
return 1;

}

int main()
{
	int n,m,length;
	scanf("%d%d",&n,&m);
	int i,j;
	for(i=0;i<n;i++)
		for(j=0;j<m;j++)
			scanf("%d",&matrix[i][j]);
	int cur=n,now;
	while(cur%2==0)
	{
		//printf("%d\n",cur );
		if(fun(0,cur,m))
			cur=cur/2;
		else
			break;

	}
	printf("%d\n",cur );
	return 0;
}


#include <stdio.h>
#include <stdlib.h>
int a[110][110];
int main()
{
   int n,m,i,j,ans,ok;
   scanf("%d%d",&n,&m);
   for(i=1;i<=n;i++)
        for(j=1;j<=m;j++)
           scanf("%d",&a[i][j]);
           ok=1;
    if(n%2==1)
    {
        printf("%d\n",n);
        return 0;
    }
    do
    {
         ans=n; n/=2;
        for(i=1;i<=n;i++)

        {

            if(ok==0) break;
            for(j=1;j<=m;j++)
                if(a[i][j]!=a[2*n-i+1][j])
                  {ok=0; break;}
        }

    }while(ok);
    printf("%d\n",ans);

    return 0;
}


#include <stdio.h>
#include <stdlib.h>
#include<string.h>
int a[110][110];
char c[110][110];
int main()
{
   int n,m,i,j,ans,ok;
   scanf("%d%d",&n,&m);
   for(i=1;i<=n;i++)
        for(j=1;j<=m;j++)
           scanf("%d",&a[i][j]);
           ok=1;
    do
    {
        if(n%2==1&&n>2) {printf("%d\n",n); return 0;}
        ans=n; n/=2;
        for(i=1;i<=n;i++){
                if(!ok) break;
            for(j=1;j<=m;j++)
            if(a[i][j]!=a[2*n-i+1][j])
               {     ok=0;break;}
        }
    }while(ok&&ans>1);
    printf("%d\n",ans);

    return 0;
}


#include <stdio.h>
#include <stdlib.h>
int a[110][110];
int main()
{
   int n,m,i,j,ans,ok;
   scanf("%d%d",&n,&m);
   for(i=1;i<=n;i++)
        for(j=1;j<=m;j++)
           scanf("%d",&a[i][j]);
           ok=1;
    if(n%2==1)
    {
        printf("%d\n",n);
        return 0;
    }
    do
    {
         ans=n; n/=2;
        for(i=1;i<=n;i++)
        {
            for(j=1;j<=m;j++)
                if(a[i][j]!=a[2*n-i+1][j])
                  ok=0; goto A;
        }
        A:;
    }while(ok);
    printf("%d\n",ans);

    return 0;
}


#include <stdio.h>
#include <stdlib.h>
int a[110][110];
int main()
{
   int n,m,i,j,ans,ok;
   scanf("%d%d",&n,&m);
   for(i=1;i<=n;i++)
        for(j=1;j<=m;j++)
           scanf("%d",&a[i][j]);
           ok=1;
    if(n%2==1)
    {
        printf("%d\n",n);
        return 0;
    }
    do
    {
         ans=n; n/=2;
        for(i=1;i<=n;i++)
        {
            for(j=1;j<=m;j++)
                if(a[i][j]!=a[2*n-i+1][j])
                  ok=0;
        }
    }while(ok);
    printf("%d\n",ans);

    return 0;
}


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

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

    static class AMinimizaciyaStroki {
        public void solve(int testNumber, InputReader in, PrintWriter out) {

            int n = in.nextInt();
            String s = in.nextToken();
            out.println(s.substring(0, n - 1));

        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String nextToken() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(nextToken());
        }

    }
}


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

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

    static class AMinimizaciyaStroki {
        public void solve(int testNumber, InputReader in, PrintWriter out) {

            int n = in.nextInt();
            String s = in.nextToken();
            int minIndex = Integer.MAX_VALUE;
            int min = Integer.MAX_VALUE;
            for (int i = 1; i < s.length(); i++) {
                char ch = s.charAt(i);
                if (min > s.charAt(i) - s.charAt(i - 1)) {
                    minIndex = i - 1;
                    min = s.charAt(i) - s.charAt(i - 1);
                }
            }

            out.println(new StringBuilder(s).delete(minIndex, minIndex + 1).toString());

        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String nextToken() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(nextToken());
        }

    }
}


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

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

    static class AMinimizaciyaStroki {
        public void solve(int testNumber, InputReader in, PrintWriter out) {

            int n = in.nextInt();
            String s = in.nextToken();
//        int minIndex = Integer.MAX_VALUE;
//        int min = Integer.MAX_VALUE;
            for (int i = 1; i < n; i++) {

//            if(min > s.charAt(i) - s.charAt(i-1)){
//                minIndex = i - 1;
//                min = s.charAt(i) - s.charAt(i-1);
//            }

                if (i == n - 1 || s.charAt(i) - s.charAt(i - 1) < 0) {
                    out.println(new StringBuilder(s).delete(i - 1, i).toString());
                    return;
                }
            }

//        out.println(new StringBuilder(s).delete(minIndex, minIndex+1).toString());

        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String nextToken() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(nextToken());
        }

    }
}


/*
    Aman Agarwal
    algo.java
*/

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

public class A1076
{
    static class FastReader
    {
            BufferedReader br;
            StringTokenizer st;

            public FastReader()
            {
                br = new BufferedReader(new InputStreamReader(System.in));
            }

            String next()
            {
                while (st == null || !st.hasMoreElements())
                {
                    try
                    {
                        st = new StringTokenizer(br.readLine());
                    }
                    catch (IOException  e)
                    {
                        e.printStackTrace();
                    }
                }
                return st.nextToken();
            }

            int nextInt()
            {
                return Integer.parseInt(next());
            }

            long nextLong()
            {
                return Long.parseLong(next());
            }

            double nextDouble()
            {
                return Double.parseDouble(next());
            }

            String nextLine()
            {
                String str = "";
                try
                {
                    str = br.readLine();
                }
                catch (IOException e)
                {
                    e.printStackTrace();
                }
                return str;
            }
    }

    static FastReader sc = new FastReader();
    static PrintWriter out = new PrintWriter(System.out);
    static int ni()throws IOException{return sc.nextInt();}
    static long nl()throws IOException{return sc.nextLong();}
    static int[][] nai2(int n,int m)throws IOException{int a[][] = new int[n][m];for(int i=0;i<n;i++)for(int j=0;j<m;j++)a[i][j] = ni();return a;}
    static int[] nai(int N,int start)throws IOException{int[]A=new int[N+start];for(int i=start;i!=(N+start);i++){A[i]=ni();}return A;}
    static Integer[] naI(int N,int start)throws IOException{Integer[]A=new Integer[N+start];for(int i=start;i!=(N+start);i++){A[i]=ni();}return A;}
    static long[] nal(int N)throws IOException{long[]A=new long[N];for(int i=0;i!=N;i++){A[i]=nl();}return A;}
    static char[] nac()throws IOException{char[]A=sc.next().toCharArray();return A;}
    static void print(int arr[]){for(int i=0;i<arr.length;i++)out.print(arr[i]+" ");out.println();}
    static void print(long arr[]){for(int i=0;i<arr.length;i++)out.print(arr[i]+" ");out.println();}
    static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);}
    static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);}
    static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));} // return the number of set bits.
    static boolean isPrime(int number){if(number==1) return false;if (number == 2 || number == 3){return true;}if (number % 2 == 0) {return false;}int sqrt = (int) Math.sqrt(number) + 1;for(int i = 3; i < sqrt; i += 2){if (number % i == 0){return false;}}return true;}
    static boolean isPrime(long number){if(number==1) return false;if (number == 2 || number == 3){return true;}if (number % 2 == 0) {return false;}long sqrt = (long) Math.sqrt(number) + 1;for(int i = 3; i < sqrt; i += 2){if (number % i == 0){return false;}}return true;}
    static int power(int n,int p){if(p==0)return 1;int a = power(n,p/2);a = a*a;int b = p & 1;if(b!=0){a =  n*a;}return a;}
    static long power(long n,long p){if(p==0)return 1;long a = power(n,p/2);a = a*a;long b = p & 1;if(b!=0){a =  n*a;}return a;}
    static void reverse(int[] a) {int b;for (int i = 0, j = a.length - 1; i < j; i++, j--) {b = a[i];a[i] = a[j];a[j] = b;}}
    static void reverse(long[] a) {long b;for (int i = 0, j = a.length - 1; i < j; i++, j--) {b = a[i];a[i] = a[j];a[j] = b;}}
    static void swap(int a[],int i,int j){a[i] = a[i] ^ a[j];a[j] = a[j] ^ a[i];a[i] = a[i] ^ a[j];}
    static void swap(long a[],int i,int j){a[i] = a[i] ^ a[j];a[j] = a[j] ^ a[i];a[i] = a[i] ^ a[j];}
    static int count(int n){int c=0;while(n>0){c++;n = n/10;}return c;}
    static int[] prefix_sum(int a[],int n){int s[] = new int[n];s[0] = a[0];for(int i=1;i<n;i++){s[i] = a[i]+s[i-1];}return s;}
    static long[] prefix_sum_int(int a[],int n){long s[] = new long[n];s[0] = (long)a[0];for(int i=1;i<n;i++){s[i] = ((long)a[i])+s[i-1];}return s;}
    static long[] prefix_sum_Integer(Integer a[],int n){long s[] = new long[n];s[0] = (long)a[0];for(int i=1;i<n;i++){s[i] = ((long)a[i])+s[i-1];}return s;}
    static long[] prefix_sum_long(long a[],int n){long s[] = new long[n];s[0] = a[0];for(int i=1;i<n;i++){s[i] = a[i]+s[i-1];}return s;}
    static boolean isPerfectSquare(double x){double sr = Math.sqrt(x);return ((sr - Math.floor(sr)) == 0);}
    static ArrayList<Integer> sieve(int n) {int k=0; boolean prime[] = new boolean[n+1];ArrayList<Integer> p_arr = new ArrayList<>();for(int i=0;i<n;i++) prime[i] = true;for(int p = 2; p*p <=n; p++){ k=p;if(prime[p] == true) { p_arr.add(p);for(int i = p*2; i <= n; i += p) prime[i] = false; } }for(int i = k+1;i<=n;i++){if(prime[i]==true)p_arr.add(i);}return p_arr;}
    static boolean[] seive_check(int n) {boolean prime[] = new boolean[n+1];for(int i=0;i<n;i++) prime[i] = true;for(int p = 2; p*p <=n; p++){ if(prime[p] == true) { for(int i = p*2; i <= n; i += p) prime[i] = false; } }prime[1]=false;return prime;}
    static int get_bits(int n){int p=0;while(n>0){p++;n = n>>1;}return p;}
    static int get_bits(long n){int p=0;while(n>0){p++;n = n>>1;}return p;}
    static int get_2_power(int n){if((n & (n-1))==0)return get_bits(n)-1;return -1;}
    static int get_2_power(long n){if((n & (n-1))==0)return get_bits(n)-1;return -1;}
    //gives the divisors of first n natural numbers in n*sqrt(n) time..
    static ArrayList<ArrayList<Integer>> divisors_n(int n){int i,j;ArrayList<ArrayList<Integer>> ans = new ArrayList<>();ArrayList<Integer> arr = new ArrayList<>();arr.add(1);ans.add(arr);for (i = 2; i <= n; i++){arr = new ArrayList<>();for (j = 1; j * j <= i; j++){if (i % j == 0){arr.add(j);if (i / j != j)arr.add(i/j);}}ans.add(arr);} return ans;}
    //gives divisors of a particular number in sqrt(n) time..
    static ArrayList<Integer> divisors_1(int n){ArrayList<Integer> ans = new ArrayList<>();for (int i=1; i<=Math.sqrt(n); i++){if (n%i==0){if (n/i == i)ans.add(i);else{ans.add(i);ans.add(n/i);}}}return ans;}
    static void close(){out.flush();}

    /*-------------------------Main Code Starts(algo.java)----------------------------------*/

    public static void solve() throws IOException
    {
        int n = ni();
        char s[] = sc.next().toCharArray();
        char c[] = new char[n-1];
        boolean tr = false;
        int k=0;
        for(int i=0;i<n;i++)
        {
            if(tr==false && i==n-1)
                break;
            char p1 = s[i];
            if(i==n-1)
                c[k++] = p1;
            else
            {
                char p2 = s[i+1];
                if(p2<p1)
                {
                    tr=true;
                    continue;
                }
                c[k++] = p1;
            }
        }
        out.println(String.valueOf(c));
    }

    public static void main(String[] args) throws IOException
    {
        int test = 1;
        //test = sc.nextInt();
        while(test-- > 0)
        {
            solve();
        }
        close();
    }
}


/*
    Aman Agarwal
    algo.java
*/

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

public class A1076
{
    static class FastReader
    {
            BufferedReader br;
            StringTokenizer st;

            public FastReader()
            {
                br = new BufferedReader(new InputStreamReader(System.in));
            }

            String next()
            {
                while (st == null || !st.hasMoreElements())
                {
                    try
                    {
                        st = new StringTokenizer(br.readLine());
                    }
                    catch (IOException  e)
                    {
                        e.printStackTrace();
                    }
                }
                return st.nextToken();
            }

            int nextInt()
            {
                return Integer.parseInt(next());
            }

            long nextLong()
            {
                return Long.parseLong(next());
            }

            double nextDouble()
            {
                return Double.parseDouble(next());
            }

            String nextLine()
            {
                String str = "";
                try
                {
                    str = br.readLine();
                }
                catch (IOException e)
                {
                    e.printStackTrace();
                }
                return str;
            }
    }

    static FastReader sc = new FastReader();
    static PrintWriter out = new PrintWriter(System.out);
    static int ni()throws IOException{return sc.nextInt();}
    static long nl()throws IOException{return sc.nextLong();}
    static int[][] nai2(int n,int m)throws IOException{int a[][] = new int[n][m];for(int i=0;i<n;i++)for(int j=0;j<m;j++)a[i][j] = ni();return a;}
    static int[] nai(int N,int start)throws IOException{int[]A=new int[N+start];for(int i=start;i!=(N+start);i++){A[i]=ni();}return A;}
    static Integer[] naI(int N,int start)throws IOException{Integer[]A=new Integer[N+start];for(int i=start;i!=(N+start);i++){A[i]=ni();}return A;}
    static long[] nal(int N)throws IOException{long[]A=new long[N];for(int i=0;i!=N;i++){A[i]=nl();}return A;}
    static char[] nac()throws IOException{char[]A=sc.next().toCharArray();return A;}
    static void print(int arr[]){for(int i=0;i<arr.length;i++)out.print(arr[i]+" ");out.println();}
    static void print(long arr[]){for(int i=0;i<arr.length;i++)out.print(arr[i]+" ");out.println();}
    static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);}
    static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);}
    static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));} // return the number of set bits.
    static boolean isPrime(int number){if(number==1) return false;if (number == 2 || number == 3){return true;}if (number % 2 == 0) {return false;}int sqrt = (int) Math.sqrt(number) + 1;for(int i = 3; i < sqrt; i += 2){if (number % i == 0){return false;}}return true;}
    static boolean isPrime(long number){if(number==1) return false;if (number == 2 || number == 3){return true;}if (number % 2 == 0) {return false;}long sqrt = (long) Math.sqrt(number) + 1;for(int i = 3; i < sqrt; i += 2){if (number % i == 0){return false;}}return true;}
    static int power(int n,int p){if(p==0)return 1;int a = power(n,p/2);a = a*a;int b = p & 1;if(b!=0){a =  n*a;}return a;}
    static long power(long n,long p){if(p==0)return 1;long a = power(n,p/2);a = a*a;long b = p & 1;if(b!=0){a =  n*a;}return a;}
    static void reverse(int[] a) {int b;for (int i = 0, j = a.length - 1; i < j; i++, j--) {b = a[i];a[i] = a[j];a[j] = b;}}
    static void reverse(long[] a) {long b;for (int i = 0, j = a.length - 1; i < j; i++, j--) {b = a[i];a[i] = a[j];a[j] = b;}}
    static void swap(int a[],int i,int j){a[i] = a[i] ^ a[j];a[j] = a[j] ^ a[i];a[i] = a[i] ^ a[j];}
    static void swap(long a[],int i,int j){a[i] = a[i] ^ a[j];a[j] = a[j] ^ a[i];a[i] = a[i] ^ a[j];}
    static int count(int n){int c=0;while(n>0){c++;n = n/10;}return c;}
    static int[] prefix_sum(int a[],int n){int s[] = new int[n];s[0] = a[0];for(int i=1;i<n;i++){s[i] = a[i]+s[i-1];}return s;}
    static long[] prefix_sum_int(int a[],int n){long s[] = new long[n];s[0] = (long)a[0];for(int i=1;i<n;i++){s[i] = ((long)a[i])+s[i-1];}return s;}
    static long[] prefix_sum_Integer(Integer a[],int n){long s[] = new long[n];s[0] = (long)a[0];for(int i=1;i<n;i++){s[i] = ((long)a[i])+s[i-1];}return s;}
    static long[] prefix_sum_long(long a[],int n){long s[] = new long[n];s[0] = a[0];for(int i=1;i<n;i++){s[i] = a[i]+s[i-1];}return s;}
    static boolean isPerfectSquare(double x){double sr = Math.sqrt(x);return ((sr - Math.floor(sr)) == 0);}
    static ArrayList<Integer> sieve(int n) {int k=0; boolean prime[] = new boolean[n+1];ArrayList<Integer> p_arr = new ArrayList<>();for(int i=0;i<n;i++) prime[i] = true;for(int p = 2; p*p <=n; p++){ k=p;if(prime[p] == true) { p_arr.add(p);for(int i = p*2; i <= n; i += p) prime[i] = false; } }for(int i = k+1;i<=n;i++){if(prime[i]==true)p_arr.add(i);}return p_arr;}
    static boolean[] seive_check(int n) {boolean prime[] = new boolean[n+1];for(int i=0;i<n;i++) prime[i] = true;for(int p = 2; p*p <=n; p++){ if(prime[p] == true) { for(int i = p*2; i <= n; i += p) prime[i] = false; } }prime[1]=false;return prime;}
    static int get_bits(int n){int p=0;while(n>0){p++;n = n>>1;}return p;}
    static int get_bits(long n){int p=0;while(n>0){p++;n = n>>1;}return p;}
    static int get_2_power(int n){if((n & (n-1))==0)return get_bits(n)-1;return -1;}
    static int get_2_power(long n){if((n & (n-1))==0)return get_bits(n)-1;return -1;}
    //gives the divisors of first n natural numbers in n*sqrt(n) time..
    static ArrayList<ArrayList<Integer>> divisors_n(int n){int i,j;ArrayList<ArrayList<Integer>> ans = new ArrayList<>();ArrayList<Integer> arr = new ArrayList<>();arr.add(1);ans.add(arr);for (i = 2; i <= n; i++){arr = new ArrayList<>();for (j = 1; j * j <= i; j++){if (i % j == 0){arr.add(j);if (i / j != j)arr.add(i/j);}}ans.add(arr);} return ans;}
    //gives divisors of a particular number in sqrt(n) time..
    static ArrayList<Integer> divisors_1(int n){ArrayList<Integer> ans = new ArrayList<>();for (int i=1; i<=Math.sqrt(n); i++){if (n%i==0){if (n/i == i)ans.add(i);else{ans.add(i);ans.add(n/i);}}}return ans;}
    static void close(){out.flush();}

    /*-------------------------Main Code Starts(algo.java)----------------------------------*/

    public static void solve() throws IOException
    {
        int n = ni();
        char s[] = sc.next().toCharArray();
        char c[] = new char[n-1];
        boolean tr = false;
        int k=0;
        for(int i=0;i<n;i++)
        {
            if(tr==false && i==n-1)
                break;
            char p1 = s[i];
            if(i==n-1)
                c[k++] = p1;
            else
            {
                char p2 = s[i+1];
                if(p2<p1 && tr==false)
                {
                    tr=true;
                    continue;
                }
                c[k++] = p1;
            }
        }
        out.println(String.valueOf(c));
    }

    public static void main(String[] args) throws IOException
    {
        int test = 1;
        //test = sc.nextInt();
        while(test-- > 0)
        {
            solve();
        }
        close();
    }
}


/*
    Aman Agarwal
    algo.java
*/

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

public class A1076
{
    static class FastReader
    {
            BufferedReader br;
            StringTokenizer st;

            public FastReader()
            {
                br = new BufferedReader(new InputStreamReader(System.in));
            }

            String next()
            {
                while (st == null || !st.hasMoreElements())
                {
                    try
                    {
                        st = new StringTokenizer(br.readLine());
                    }
                    catch (IOException  e)
                    {
                        e.printStackTrace();
                    }
                }
                return st.nextToken();
            }

            int nextInt()
            {
                return Integer.parseInt(next());
            }

            long nextLong()
            {
                return Long.parseLong(next());
            }

            double nextDouble()
            {
                return Double.parseDouble(next());
            }

            String nextLine()
            {
                String str = "";
                try
                {
                    str = br.readLine();
                }
                catch (IOException e)
                {
                    e.printStackTrace();
                }
                return str;
            }
    }

    static FastReader sc = new FastReader();
    static PrintWriter out = new PrintWriter(System.out);
    static int ni()throws IOException{return sc.nextInt();}
    static long nl()throws IOException{return sc.nextLong();}
    static int[][] nai2(int n,int m)throws IOException{int a[][] = new int[n][m];for(int i=0;i<n;i++)for(int j=0;j<m;j++)a[i][j] = ni();return a;}
    static int[] nai(int N,int start)throws IOException{int[]A=new int[N+start];for(int i=start;i!=(N+start);i++){A[i]=ni();}return A;}
    static Integer[] naI(int N,int start)throws IOException{Integer[]A=new Integer[N+start];for(int i=start;i!=(N+start);i++){A[i]=ni();}return A;}
    static long[] nal(int N)throws IOException{long[]A=new long[N];for(int i=0;i!=N;i++){A[i]=nl();}return A;}
    static char[] nac()throws IOException{char[]A=sc.next().toCharArray();return A;}
    static void print(int arr[]){for(int i=0;i<arr.length;i++)out.print(arr[i]+" ");out.println();}
    static void print(long arr[]){for(int i=0;i<arr.length;i++)out.print(arr[i]+" ");out.println();}
    static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);}
    static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);}
    static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));} // return the number of set bits.
    static boolean isPrime(int number){if(number==1) return false;if (number == 2 || number == 3){return true;}if (number % 2 == 0) {return false;}int sqrt = (int) Math.sqrt(number) + 1;for(int i = 3; i < sqrt; i += 2){if (number % i == 0){return false;}}return true;}
    static boolean isPrime(long number){if(number==1) return false;if (number == 2 || number == 3){return true;}if (number % 2 == 0) {return false;}long sqrt = (long) Math.sqrt(number) + 1;for(int i = 3; i < sqrt; i += 2){if (number % i == 0){return false;}}return true;}
    static int power(int n,int p){if(p==0)return 1;int a = power(n,p/2);a = a*a;int b = p & 1;if(b!=0){a =  n*a;}return a;}
    static long power(long n,long p){if(p==0)return 1;long a = power(n,p/2);a = a*a;long b = p & 1;if(b!=0){a =  n*a;}return a;}
    static void reverse(int[] a) {int b;for (int i = 0, j = a.length - 1; i < j; i++, j--) {b = a[i];a[i] = a[j];a[j] = b;}}
    static void reverse(long[] a) {long b;for (int i = 0, j = a.length - 1; i < j; i++, j--) {b = a[i];a[i] = a[j];a[j] = b;}}
    static void swap(int a[],int i,int j){a[i] = a[i] ^ a[j];a[j] = a[j] ^ a[i];a[i] = a[i] ^ a[j];}
    static void swap(long a[],int i,int j){a[i] = a[i] ^ a[j];a[j] = a[j] ^ a[i];a[i] = a[i] ^ a[j];}
    static int count(int n){int c=0;while(n>0){c++;n = n/10;}return c;}
    static int[] prefix_sum(int a[],int n){int s[] = new int[n];s[0] = a[0];for(int i=1;i<n;i++){s[i] = a[i]+s[i-1];}return s;}
    static long[] prefix_sum_int(int a[],int n){long s[] = new long[n];s[0] = (long)a[0];for(int i=1;i<n;i++){s[i] = ((long)a[i])+s[i-1];}return s;}
    static long[] prefix_sum_Integer(Integer a[],int n){long s[] = new long[n];s[0] = (long)a[0];for(int i=1;i<n;i++){s[i] = ((long)a[i])+s[i-1];}return s;}
    static long[] prefix_sum_long(long a[],int n){long s[] = new long[n];s[0] = a[0];for(int i=1;i<n;i++){s[i] = a[i]+s[i-1];}return s;}
    static boolean isPerfectSquare(double x){double sr = Math.sqrt(x);return ((sr - Math.floor(sr)) == 0);}
    static ArrayList<Integer> sieve(int n) {int k=0; boolean prime[] = new boolean[n+1];ArrayList<Integer> p_arr = new ArrayList<>();for(int i=0;i<n;i++) prime[i] = true;for(int p = 2; p*p <=n; p++){ k=p;if(prime[p] == true) { p_arr.add(p);for(int i = p*2; i <= n; i += p) prime[i] = false; } }for(int i = k+1;i<=n;i++){if(prime[i]==true)p_arr.add(i);}return p_arr;}
    static boolean[] seive_check(int n) {boolean prime[] = new boolean[n+1];for(int i=0;i<n;i++) prime[i] = true;for(int p = 2; p*p <=n; p++){ if(prime[p] == true) { for(int i = p*2; i <= n; i += p) prime[i] = false; } }prime[1]=false;return prime;}
    static int get_bits(int n){int p=0;while(n>0){p++;n = n>>1;}return p;}
    static int get_bits(long n){int p=0;while(n>0){p++;n = n>>1;}return p;}
    static int get_2_power(int n){if((n & (n-1))==0)return get_bits(n)-1;return -1;}
    static int get_2_power(long n){if((n & (n-1))==0)return get_bits(n)-1;return -1;}
    //gives the divisors of first n natural numbers in n*sqrt(n) time..
    static ArrayList<ArrayList<Integer>> divisors_n(int n){int i,j;ArrayList<ArrayList<Integer>> ans = new ArrayList<>();ArrayList<Integer> arr = new ArrayList<>();arr.add(1);ans.add(arr);for (i = 2; i <= n; i++){arr = new ArrayList<>();for (j = 1; j * j <= i; j++){if (i % j == 0){arr.add(j);if (i / j != j)arr.add(i/j);}}ans.add(arr);} return ans;}
    //gives divisors of a particular number in sqrt(n) time..
    static ArrayList<Integer> divisors_1(int n){ArrayList<Integer> ans = new ArrayList<>();for (int i=1; i<=Math.sqrt(n); i++){if (n%i==0){if (n/i == i)ans.add(i);else{ans.add(i);ans.add(n/i);}}}return ans;}
    static void close(){out.flush();}

    /*-------------------------Main Code Starts(algo.java)----------------------------------*/

    public static void solve() throws IOException
    {
        int n = ni();
        char s[] = sc.next().toCharArray();
        char c[] = new char[n-1];
        boolean tr = false;
        int k=0;
        for(int i=0;i<n;i++)
        {
            if(tr==false && i==n-1)
                break;
            char p1 = s[i];
            if(i==n-1)
                c[k++] = p1;
            else
            {
                char p2 = s[i+1];
                if(p2<=p1 && tr==false)
                {
                    tr=true;
                    continue;
                }
                c[k++] = p1;
            }
        }
        out.println(String.valueOf(c));
    }

    public static void main(String[] args) throws IOException
    {
        int test = 1;
        //test = sc.nextInt();
        while(test-- > 0)
        {
            solve();
        }
        close();
    }
}


/*
    Aman Agarwal
    algo.java
*/

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

public class A1076
{
    static class FastReader
    {
            BufferedReader br;
            StringTokenizer st;

            public FastReader()
            {
                br = new BufferedReader(new InputStreamReader(System.in));
            }

            String next()
            {
                while (st == null || !st.hasMoreElements())
                {
                    try
                    {
                        st = new StringTokenizer(br.readLine());
                    }
                    catch (IOException  e)
                    {
                        e.printStackTrace();
                    }
                }
                return st.nextToken();
            }

            int nextInt()
            {
                return Integer.parseInt(next());
            }

            long nextLong()
            {
                return Long.parseLong(next());
            }

            double nextDouble()
            {
                return Double.parseDouble(next());
            }

            String nextLine()
            {
                String str = "";
                try
                {
                    str = br.readLine();
                }
                catch (IOException e)
                {
                    e.printStackTrace();
                }
                return str;
            }
    }

    static FastReader sc = new FastReader();
    static PrintWriter out = new PrintWriter(System.out);
    static int ni()throws IOException{return sc.nextInt();}
    static long nl()throws IOException{return sc.nextLong();}
    static int[][] nai2(int n,int m)throws IOException{int a[][] = new int[n][m];for(int i=0;i<n;i++)for(int j=0;j<m;j++)a[i][j] = ni();return a;}
    static int[] nai(int N,int start)throws IOException{int[]A=new int[N+start];for(int i=start;i!=(N+start);i++){A[i]=ni();}return A;}
    static Integer[] naI(int N,int start)throws IOException{Integer[]A=new Integer[N+start];for(int i=start;i!=(N+start);i++){A[i]=ni();}return A;}
    static long[] nal(int N)throws IOException{long[]A=new long[N];for(int i=0;i!=N;i++){A[i]=nl();}return A;}
    static char[] nac()throws IOException{char[]A=sc.next().toCharArray();return A;}
    static void print(int arr[]){for(int i=0;i<arr.length;i++)out.print(arr[i]+" ");out.println();}
    static void print(long arr[]){for(int i=0;i<arr.length;i++)out.print(arr[i]+" ");out.println();}
    static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);}
    static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);}
    static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));} // return the number of set bits.
    static boolean isPrime(int number){if(number==1) return false;if (number == 2 || number == 3){return true;}if (number % 2 == 0) {return false;}int sqrt = (int) Math.sqrt(number) + 1;for(int i = 3; i < sqrt; i += 2){if (number % i == 0){return false;}}return true;}
    static boolean isPrime(long number){if(number==1) return false;if (number == 2 || number == 3){return true;}if (number % 2 == 0) {return false;}long sqrt = (long) Math.sqrt(number) + 1;for(int i = 3; i < sqrt; i += 2){if (number % i == 0){return false;}}return true;}
    static int power(int n,int p){if(p==0)return 1;int a = power(n,p/2);a = a*a;int b = p & 1;if(b!=0){a =  n*a;}return a;}
    static long power(long n,long p){if(p==0)return 1;long a = power(n,p/2);a = a*a;long b = p & 1;if(b!=0){a =  n*a;}return a;}
    static void reverse(int[] a) {int b;for (int i = 0, j = a.length - 1; i < j; i++, j--) {b = a[i];a[i] = a[j];a[j] = b;}}
    static void reverse(long[] a) {long b;for (int i = 0, j = a.length - 1; i < j; i++, j--) {b = a[i];a[i] = a[j];a[j] = b;}}
    static void swap(int a[],int i,int j){a[i] = a[i] ^ a[j];a[j] = a[j] ^ a[i];a[i] = a[i] ^ a[j];}
    static void swap(long a[],int i,int j){a[i] = a[i] ^ a[j];a[j] = a[j] ^ a[i];a[i] = a[i] ^ a[j];}
    static int count(int n){int c=0;while(n>0){c++;n = n/10;}return c;}
    static int[] prefix_sum(int a[],int n){int s[] = new int[n];s[0] = a[0];for(int i=1;i<n;i++){s[i] = a[i]+s[i-1];}return s;}
    static long[] prefix_sum_int(int a[],int n){long s[] = new long[n];s[0] = (long)a[0];for(int i=1;i<n;i++){s[i] = ((long)a[i])+s[i-1];}return s;}
    static long[] prefix_sum_Integer(Integer a[],int n){long s[] = new long[n];s[0] = (long)a[0];for(int i=1;i<n;i++){s[i] = ((long)a[i])+s[i-1];}return s;}
    static long[] prefix_sum_long(long a[],int n){long s[] = new long[n];s[0] = a[0];for(int i=1;i<n;i++){s[i] = a[i]+s[i-1];}return s;}
    static boolean isPerfectSquare(double x){double sr = Math.sqrt(x);return ((sr - Math.floor(sr)) == 0);}
    static ArrayList<Integer> sieve(int n) {int k=0; boolean prime[] = new boolean[n+1];ArrayList<Integer> p_arr = new ArrayList<>();for(int i=0;i<n;i++) prime[i] = true;for(int p = 2; p*p <=n; p++){ k=p;if(prime[p] == true) { p_arr.add(p);for(int i = p*2; i <= n; i += p) prime[i] = false; } }for(int i = k+1;i<=n;i++){if(prime[i]==true)p_arr.add(i);}return p_arr;}
    static boolean[] seive_check(int n) {boolean prime[] = new boolean[n+1];for(int i=0;i<n;i++) prime[i] = true;for(int p = 2; p*p <=n; p++){ if(prime[p] == true) { for(int i = p*2; i <= n; i += p) prime[i] = false; } }prime[1]=false;return prime;}
    static int get_bits(int n){int p=0;while(n>0){p++;n = n>>1;}return p;}
    static int get_bits(long n){int p=0;while(n>0){p++;n = n>>1;}return p;}
    static int get_2_power(int n){if((n & (n-1))==0)return get_bits(n)-1;return -1;}
    static int get_2_power(long n){if((n & (n-1))==0)return get_bits(n)-1;return -1;}
    //gives the divisors of first n natural numbers in n*sqrt(n) time..
    static ArrayList<ArrayList<Integer>> divisors_n(int n){int i,j;ArrayList<ArrayList<Integer>> ans = new ArrayList<>();ArrayList<Integer> arr = new ArrayList<>();arr.add(1);ans.add(arr);for (i = 2; i <= n; i++){arr = new ArrayList<>();for (j = 1; j * j <= i; j++){if (i % j == 0){arr.add(j);if (i / j != j)arr.add(i/j);}}ans.add(arr);} return ans;}
    //gives divisors of a particular number in sqrt(n) time..
    static ArrayList<Integer> divisors_1(int n){ArrayList<Integer> ans = new ArrayList<>();for (int i=1; i<=Math.sqrt(n); i++){if (n%i==0){if (n/i == i)ans.add(i);else{ans.add(i);ans.add(n/i);}}}return ans;}
    static void close(){out.flush();}

    /*-------------------------Main Code Starts(algo.java)----------------------------------*/

    public static void solve() throws IOException
    {
        int n = ni();
        char s[] = sc.next().toCharArray();
        char c[] = new char[n-1];
        boolean tr = false;
        int k=0;
        for(int i=0;i<n;i++)
        {
            if(tr==false && i==n-1)
                break;
            char p1 = s[i];
            if(i==n-1)
                c[k++] = p1;
            else
            {
                char p2 = s[i+1];
                if(p2<=p1)
                {
                    tr=true;
                    continue;
                }
                c[k++] = p1;
            }
        }
        out.println(String.valueOf(c));
    }

    public static void main(String[] args) throws IOException
    {
        int test = 1;
        //test = sc.nextInt();
        while(test-- > 0)
        {
            solve();
        }
        close();
    }
}


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

public class Educational_Codeforces_Round_54_A {

    public static void main(String[] args) {
        InputReader reader = new InputReader(System.in);
        int n=reader.nextInt();
        String s=reader.next(),result=s,temp="";
        for(int i=0;i<n;i++) {
        	temp=s.substring(0, i)+s.substring(i+1,n);
        	result=result.compareTo(temp)>0?temp:result;
        }
        System.out.print(result);
    }

    static class InputReader {

        StringTokenizer tokenizer;
        BufferedReader reader;
        String token;
        String temp;

        public InputReader(InputStream stream) {
            tokenizer = null;
            reader = new BufferedReader(new InputStreamReader(stream));
        }

        public InputReader(FileInputStream stream) {
            tokenizer = null;
            reader = new BufferedReader(new InputStreamReader(stream));
        }

        public String nextLine() throws IOException {
            return reader.readLine();
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    if (temp != null) {
                        tokenizer = new StringTokenizer(temp);
                        temp = null;
                    } else {
                        tokenizer = new StringTokenizer(reader.readLine());
                    }

                } catch (IOException e) {
                }
            }
            return tokenizer.nextToken();
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

    }
}


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

public class Educational_Codeforces_Round_54_A {

	public static void main(String[] args) {
		InputReader reader = new InputReader(System.in);
		int number = reader.nextInt();
		String result = "", s = reader.next();
		char[] arr = s.toCharArray();
		boolean check = false;
		for (int i = 0; i < number - 1; i++) {
			if (arr[i] > arr[i + 1]) {
				check = true;
				result = s.substring(0, i) + s.substring(i + 1, number);
				break;
			}
		}
		System.out.print(check ? result : s.substring(0, number - 1));
	}

	static class InputReader {

		StringTokenizer tokenizer;
		BufferedReader reader;
		String token;
		String temp;

		public InputReader(InputStream stream) {
			tokenizer = null;
			reader = new BufferedReader(new InputStreamReader(stream));
		}

		public InputReader(FileInputStream stream) {
			tokenizer = null;
			reader = new BufferedReader(new InputStreamReader(stream));
		}

		public String nextLine() throws IOException {
			return reader.readLine();
		}

		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					if (temp != null) {
						tokenizer = new StringTokenizer(temp);
						temp = null;
					} else {
						tokenizer = new StringTokenizer(reader.readLine());
					}

				} catch (IOException e) {
				}
			}
			return tokenizer.nextToken();
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

	}
}


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

public class Educational_Codeforces_Round_54_A {

	public static void main(String[] args) {
		InputReader reader = new InputReader(System.in);
		int n = reader.nextInt(), index = 0;
		String s = reader.next();
		char[] temp = s.toCharArray();
		char max = 'a';
		for (int i = 0; i < n; i++) {
			if (temp[i] > max) {
				max = temp[i];
				index = i;
			}
		}
		System.out.print(s.substring(0, index) + s.substring(index + 1, n));
	}

	static class InputReader {

		StringTokenizer tokenizer;
		BufferedReader reader;
		String token;
		String temp;

		public InputReader(InputStream stream) {
			tokenizer = null;
			reader = new BufferedReader(new InputStreamReader(stream));
		}

		public InputReader(FileInputStream stream) {
			tokenizer = null;
			reader = new BufferedReader(new InputStreamReader(stream));
		}

		public String nextLine() throws IOException {
			return reader.readLine();
		}

		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					if (temp != null) {
						tokenizer = new StringTokenizer(temp);
						temp = null;
					} else {
						tokenizer = new StringTokenizer(reader.readLine());
					}

				} catch (IOException e) {
				}
			}
			return tokenizer.nextToken();
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

	}
}


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

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int length = Integer.parseInt(br.readLine());
		String original = br.readLine();
		char[] word = original.toCharArray();
		char[] letters = original.toCharArray();

			String ans = " ";

			Arrays.sort(letters);
			char greatest = letters[length-1];
			boolean quite = false;
			for(int i = 0; i < length; i++) {
				char current = word[i];
				if(current != greatest) {
					ans+=current;
				}
				else if(current == greatest && quite) {
					ans+=current;
				}
				else if(current == greatest && !quite) {
					quite = true;
				}
			}
			System.out.println(ans);
	}
}


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

public class Main {

	public static void main(String[] args) throws IOException{

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int length = Integer.parseInt(br.readLine());
		String ans = " ";
		boolean remove = false;

		String word = br.readLine();

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

			char current = word.charAt(i);
			char next = word.charAt(i + 1);
			//System.out.println("actual " +current+" anterior: "+next);
			if(current >= next && !remove) {
				//System.out.println("Entro al if");
				remove = true;
			}
			else {
				//System.out.println("Entro al else");
				ans+=current;
			}

			if(i==length-2) {
				ans+= next;
			}

		}
		System.out.println(ans);
	}
}


/**
 * 8
 * rkqggsab
 */

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

public class Main {

	public static void main(String[] args) throws IOException{

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int length = Integer.parseInt(br.readLine());
		String word = br.readLine();

		String ans = "";
		for(int i = 0; i < length - 1; i++) {

			String current = "" +word.charAt(i);
			String next = "" + word.charAt(i + 1);

			//System.out.println("actual " + current + " anterior: " + next);
			if(current.compareTo(next) >= 0 ) {
				ans = word.replaceFirst(current, "");
				break;
			}
		}
		System.out.println(ans);
	}
}


/**
 * 8
 * rkqggsab
 */

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

public class Main {

	public static void main(String[] args) throws IOException{

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int length = Integer.parseInt(br.readLine());
		String word = br.readLine();

		String ans = word;
		for(int i = 0; i < length - 1; i++) {

			String current = "" +word.charAt(i);
			String next = "" + word.charAt(i + 1);

			//System.out.println("actual " + current + " anterior: " + next);
			if(current.compareTo(next) > 0 ) {
				ans = word.replaceFirst(current, "");
				break;
			}
		}
		if(ans == word) {
			ans = ans.substring(0, length-1);
		}
		System.out.println(ans);
	}
}


import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;

public class Main {

    public static void main(String[] args) throws IOException {
        InputReader input = new InputReader();
         int N= input.nextInt();

        int index=0;
        String test = input.next();
        int max =(int)test.charAt(0);
        for(int i=1;i<N;i++){
            if((int)test.charAt(i) > max ){
                index=i;
                break;
            }
        }
        for(int i=0;i<N;i++){
            if(i!=index){
                System.out.print(test.charAt(i));
            }
        }
            }

        static class InputReader {

        InputStream is = System.in;
        byte[] inbuf = new byte[1 << 23];
        int lenbuf = 0, ptrbuf = 0;

        public InputReader() throws IOException {
            lenbuf = is.read(inbuf);
        }

        public int readByte() {

            if (ptrbuf >= lenbuf) {
                return -1;
            }

            return inbuf[ptrbuf++];
        }

        public boolean hasNext() {
            int t = skip();

            if (t == -1) {
                return false;
            }
            ptrbuf--;
            return true;
        }

        public boolean isSpaceChar(int c) {
            return !(c >= 33 && c <= 126);
        }

        public int skip() {
            int b;
            while ((b = readByte()) != -1 && isSpaceChar(b))
                                    ;
            return b;
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public char nextChar() {
            return (char) skip();
        }

        public String next() {
            int b = skip();
            StringBuilder sb = new StringBuilder();
            while (!(isSpaceChar(b))) {
                sb.appendCodePoint(b);
                b = readByte();
            }
            return sb.toString();
        }

        public char[] ns(int n) {
            char[] buf = new char[n];
            int b = skip(), p = 0;
            while (p < n && !(isSpaceChar(b))) {
                buf[p++] = (char) b;
                b = readByte();
            }
            return n == p ? buf : Arrays.copyOf(buf, p);
        }

        public char[][] nm(int n, int m) {
            char[][] map = new char[n][];
            for (int i = 0; i < n; i++) {
                map[i] = ns(m);
            }
            return map;
        }

        public int[] na(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        public int nextInt() {
            int num = 0, b;
            boolean minus = false;
            while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
                                    ;
            if (b == '-') {
                minus = true;
                b = readByte();
            }

            while (true) {
                if (b >= '0' && b <= '9') {
                    num = num * 10 + (b - '0');
                } else {
                    return minus ? -num : num;
                }
                b = readByte();
            }
        }

        public long nextLong() {
            long num = 0;
            int b;
            boolean minus = false;
            while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
                                    ;
            if (b == '-') {
                minus = true;
                b = readByte();
            }

            while (true) {
                if (b >= '0' && b <= '9') {
                    num = num * 10 + (b - '0');
                } else {
                    return minus ? -num : num;
                }
                b = readByte();
            }
        }

    }
}


import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;

public class Main {

    public static void main(String[] args) throws IOException {
        InputReader input = new InputReader();
         int N= input.nextInt(),count = 0;

        int max =0;
        int index=0;
        String test = input.next();
        for(int i=0;i<N;i++){
            if((int)test.charAt(i) > max ){
                max=(int)test.charAt(i);
                index=i;
            }
        }
        for(int i=0;i<N;i++){
            if(i!=index){
                System.out.print(test.charAt(i));
            }
        }
            }

        static class InputReader {

        InputStream is = System.in;
        byte[] inbuf = new byte[1 << 23];
        int lenbuf = 0, ptrbuf = 0;

        public InputReader() throws IOException {
            lenbuf = is.read(inbuf);
        }

        public int readByte() {

            if (ptrbuf >= lenbuf) {
                return -1;
            }

            return inbuf[ptrbuf++];
        }

        public boolean hasNext() {
            int t = skip();

            if (t == -1) {
                return false;
            }
            ptrbuf--;
            return true;
        }

        public boolean isSpaceChar(int c) {
            return !(c >= 33 && c <= 126);
        }

        public int skip() {
            int b;
            while ((b = readByte()) != -1 && isSpaceChar(b))
                                    ;
            return b;
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public char nextChar() {
            return (char) skip();
        }

        public String next() {
            int b = skip();
            StringBuilder sb = new StringBuilder();
            while (!(isSpaceChar(b))) {
                sb.appendCodePoint(b);
                b = readByte();
            }
            return sb.toString();
        }

        public char[] ns(int n) {
            char[] buf = new char[n];
            int b = skip(), p = 0;
            while (p < n && !(isSpaceChar(b))) {
                buf[p++] = (char) b;
                b = readByte();
            }
            return n == p ? buf : Arrays.copyOf(buf, p);
        }

        public char[][] nm(int n, int m) {
            char[][] map = new char[n][];
            for (int i = 0; i < n; i++) {
                map[i] = ns(m);
            }
            return map;
        }

        public int[] na(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        public int nextInt() {
            int num = 0, b;
            boolean minus = false;
            while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
                                    ;
            if (b == '-') {
                minus = true;
                b = readByte();
            }

            while (true) {
                if (b >= '0' && b <= '9') {
                    num = num * 10 + (b - '0');
                } else {
                    return minus ? -num : num;
                }
                b = readByte();
            }
        }

        public long nextLong() {
            long num = 0;
            int b;
            boolean minus = false;
            while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
                                    ;
            if (b == '-') {
                minus = true;
                b = readByte();
            }

            while (true) {
                if (b >= '0' && b <= '9') {
                    num = num * 10 + (b - '0');
                } else {
                    return minus ? -num : num;
                }
                b = readByte();
            }
        }

    }
}


import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;

public class Main {

    public static void main(String[] args) throws IOException {
        InputReader input = new InputReader();
         int N= input.nextInt();

        int index=0;
        String test = input.next();
        for(int i=1;i<N-1;i++){
            if((int)test.charAt(i) > (int)test.charAt(i+1) ){
                index=i;
                break;
            }
        }
        for(int i=0;i<N;i++){
            if(i!=index){
                System.out.print(test.charAt(i));
            }
        }
            }

        static class InputReader {

        InputStream is = System.in;
        byte[] inbuf = new byte[1 << 23];
        int lenbuf = 0, ptrbuf = 0;

        public InputReader() throws IOException {
            lenbuf = is.read(inbuf);
        }

        public int readByte() {

            if (ptrbuf >= lenbuf) {
                return -1;
            }

            return inbuf[ptrbuf++];
        }

        public boolean hasNext() {
            int t = skip();

            if (t == -1) {
                return false;
            }
            ptrbuf--;
            return true;
        }

        public boolean isSpaceChar(int c) {
            return !(c >= 33 && c <= 126);
        }

        public int skip() {
            int b;
            while ((b = readByte()) != -1 && isSpaceChar(b))
                                    ;
            return b;
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public char nextChar() {
            return (char) skip();
        }

        public String next() {
            int b = skip();
            StringBuilder sb = new StringBuilder();
            while (!(isSpaceChar(b))) {
                sb.appendCodePoint(b);
                b = readByte();
            }
            return sb.toString();
        }

        public char[] ns(int n) {
            char[] buf = new char[n];
            int b = skip(), p = 0;
            while (p < n && !(isSpaceChar(b))) {
                buf[p++] = (char) b;
                b = readByte();
            }
            return n == p ? buf : Arrays.copyOf(buf, p);
        }

        public char[][] nm(int n, int m) {
            char[][] map = new char[n][];
            for (int i = 0; i < n; i++) {
                map[i] = ns(m);
            }
            return map;
        }

        public int[] na(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        public int nextInt() {
            int num = 0, b;
            boolean minus = false;
            while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
                                    ;
            if (b == '-') {
                minus = true;
                b = readByte();
            }

            while (true) {
                if (b >= '0' && b <= '9') {
                    num = num * 10 + (b - '0');
                } else {
                    return minus ? -num : num;
                }
                b = readByte();
            }
        }

        public long nextLong() {
            long num = 0;
            int b;
            boolean minus = false;
            while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
                                    ;
            if (b == '-') {
                minus = true;
                b = readByte();
            }

            while (true) {
                if (b >= '0' && b <= '9') {
                    num = num * 10 + (b - '0');
                } else {
                    return minus ? -num : num;
                }
                b = readByte();
            }
        }

    }
}


import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;

public class Main {

	public static void main(String[] args) throws IOException {
		InputReader scan = new InputReader();
		int n = scan.nextInt();
		String in = scan.next();
		boolean found = false;
		for (int i = 0; i < n-1; i++) {
			if (in.charAt(i) > in.charAt(i+1)) {
				found = true;
				System.out.println(in.substring(0, i)+in.substring(i+1));
				break;
			}
		}
		if (!found) System.out.println(in.substring(0,n-1));
	}

        static class InputReader {

        InputStream is = System.in;
        byte[] inbuf = new byte[1 << 23];
        int lenbuf = 0, ptrbuf = 0;

        public InputReader() throws IOException {
            lenbuf = is.read(inbuf);
        }

        public int readByte() {

            if (ptrbuf >= lenbuf) {
                return -1;
            }

            return inbuf[ptrbuf++];
        }

        public boolean hasNext() {
            int t = skip();

            if (t == -1) {
                return false;
            }
            ptrbuf--;
            return true;
        }

        public boolean isSpaceChar(int c) {
            return !(c >= 33 && c <= 126);
        }

        public int skip() {
            int b;
            while ((b = readByte()) != -1 && isSpaceChar(b))
                                    ;
            return b;
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public char nextChar() {
            return (char) skip();
        }

        public String next() {
            int b = skip();
            StringBuilder sb = new StringBuilder();
            while (!(isSpaceChar(b))) {
                sb.appendCodePoint(b);
                b = readByte();
            }
            return sb.toString();
        }

        public char[] ns(int n) {
            char[] buf = new char[n];
            int b = skip(), p = 0;
            while (p < n && !(isSpaceChar(b))) {
                buf[p++] = (char) b;
                b = readByte();
            }
            return n == p ? buf : Arrays.copyOf(buf, p);
        }

        public char[][] nm(int n, int m) {
            char[][] map = new char[n][];
            for (int i = 0; i < n; i++) {
                map[i] = ns(m);
            }
            return map;
        }

        public int[] na(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        public int nextInt() {
            int num = 0, b;
            boolean minus = false;
            while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
                                    ;
            if (b == '-') {
                minus = true;
                b = readByte();
            }

            while (true) {
                if (b >= '0' && b <= '9') {
                    num = num * 10 + (b - '0');
                } else {
                    return minus ? -num : num;
                }
                b = readByte();
            }
        }

        public long nextLong() {
            long num = 0;
            int b;
            boolean minus = false;
            while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
                                    ;
            if (b == '-') {
                minus = true;
                b = readByte();
            }

            while (true) {
                if (b >= '0' && b <= '9') {
                    num = num * 10 + (b - '0');
                } else {
                    return minus ? -num : num;
                }
                b = readByte();
            }
        }

    }
}


import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;

public class Main {

    public static void main(String[] args) throws IOException {
        InputReader input = new InputReader();
         int N= input.nextInt();
        int index=0;
        String test = input.next();
        for(int i=0;i<N-1;i++){
            if((int)test.charAt(i) > (int)test.charAt(i+1) ){
                index=i;
                break;
            }
        }
        for(int i=0;i<N;i++){
            if(i!=index){
                System.out.print(test.charAt(i));
            }
        }
            }

        static class InputReader {

        InputStream is = System.in;
        byte[] inbuf = new byte[1 << 23];
        int lenbuf = 0, ptrbuf = 0;

        public InputReader() throws IOException {
            lenbuf = is.read(inbuf);
        }

        public int readByte() {

            if (ptrbuf >= lenbuf) {
                return -1;
            }

            return inbuf[ptrbuf++];
        }

        public boolean hasNext() {
            int t = skip();

            if (t == -1) {
                return false;
            }
            ptrbuf--;
            return true;
        }

        public boolean isSpaceChar(int c) {
            return !(c >= 33 && c <= 126);
        }

        public int skip() {
            int b;
            while ((b = readByte()) != -1 && isSpaceChar(b))
                                    ;
            return b;
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public char nextChar() {
            return (char) skip();
        }

        public String next() {
            int b = skip();
            StringBuilder sb = new StringBuilder();
            while (!(isSpaceChar(b))) {
                sb.appendCodePoint(b);
                b = readByte();
            }
            return sb.toString();
        }

        public char[] ns(int n) {
            char[] buf = new char[n];
            int b = skip(), p = 0;
            while (p < n && !(isSpaceChar(b))) {
                buf[p++] = (char) b;
                b = readByte();
            }
            return n == p ? buf : Arrays.copyOf(buf, p);
        }

        public char[][] nm(int n, int m) {
            char[][] map = new char[n][];
            for (int i = 0; i < n; i++) {
                map[i] = ns(m);
            }
            return map;
        }

        public int[] na(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        public int nextInt() {
            int num = 0, b;
            boolean minus = false;
            while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
                                    ;
            if (b == '-') {
                minus = true;
                b = readByte();
            }

            while (true) {
                if (b >= '0' && b <= '9') {
                    num = num * 10 + (b - '0');
                } else {
                    return minus ? -num : num;
                }
                b = readByte();
            }
        }

        public long nextLong() {
            long num = 0;
            int b;
            boolean minus = false;
            while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
                                    ;
            if (b == '-') {
                minus = true;
                b = readByte();
            }

            while (true) {
                if (b >= '0' && b <= '9') {
                    num = num * 10 + (b - '0');
                } else {
                    return minus ? -num : num;
                }
                b = readByte();
            }
        }

    }
}


import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;

public class Main {

    public static void main(String[] args) throws IOException {
        InputReader input = new InputReader();
         int N= input.nextInt();
        int index=0;
        String test = input.next();
        for(int i=0;i<N-1;i++){
            if(test.charAt(i) > test.charAt(i+1) ){
                index=i;
                break;
            }
        }
        for(int i=0;i<N;i++){
            if(i!=index){
                System.out.print(test.charAt(i));
            }
        }
            }

        static class InputReader {

        InputStream is = System.in;
        byte[] inbuf = new byte[1 << 23];
        int lenbuf = 0, ptrbuf = 0;

        public InputReader() throws IOException {
            lenbuf = is.read(inbuf);
        }

        public int readByte() {

            if (ptrbuf >= lenbuf) {
                return -1;
            }

            return inbuf[ptrbuf++];
        }

        public boolean hasNext() {
            int t = skip();

            if (t == -1) {
                return false;
            }
            ptrbuf--;
            return true;
        }

        public boolean isSpaceChar(int c) {
            return !(c >= 33 && c <= 126);
        }

        public int skip() {
            int b;
            while ((b = readByte()) != -1 && isSpaceChar(b))
                                    ;
            return b;
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public char nextChar() {
            return (char) skip();
        }

        public String next() {
            int b = skip();
            StringBuilder sb = new StringBuilder();
            while (!(isSpaceChar(b))) {
                sb.appendCodePoint(b);
                b = readByte();
            }
            return sb.toString();
        }

        public char[] ns(int n) {
            char[] buf = new char[n];
            int b = skip(), p = 0;
            while (p < n && !(isSpaceChar(b))) {
                buf[p++] = (char) b;
                b = readByte();
            }
            return n == p ? buf : Arrays.copyOf(buf, p);
        }

        public char[][] nm(int n, int m) {
            char[][] map = new char[n][];
            for (int i = 0; i < n; i++) {
                map[i] = ns(m);
            }
            return map;
        }

        public int[] na(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        public int nextInt() {
            int num = 0, b;
            boolean minus = false;
            while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
                                    ;
            if (b == '-') {
                minus = true;
                b = readByte();
            }

            while (true) {
                if (b >= '0' && b <= '9') {
                    num = num * 10 + (b - '0');
                } else {
                    return minus ? -num : num;
                }
                b = readByte();
            }
        }

        public long nextLong() {
            long num = 0;
            int b;
            boolean minus = false;
            while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
                                    ;
            if (b == '-') {
                minus = true;
                b = readByte();
            }

            while (true) {
                if (b >= '0' && b <= '9') {
                    num = num * 10 + (b - '0');
                } else {
                    return minus ? -num : num;
                }
                b = readByte();
            }
        }

    }
}


import java.util.Scanner;

public class MinimizingTheSreing {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scn = new Scanner(System.in);
		int N = scn.nextInt();
		String s = scn.next();
		if (N == 1) {
			if (s.charAt(0) != 'a') {
				System.out.println("a");
			} else {
				System.out.println("");
			}
		} else {
			String ans = "";
			int check = 0;
			for (int i = 0; i < N - 1; i++) {
				char ch1 = s.charAt(i);
				char ch2 = s.charAt(i + 1);
				if ((int) ch2 < (int) ch1) {
					check++;
				} else {
					ans = ans + ch1;
				}
			}
			if (check > 0) {
				System.out.println(ans + s.charAt(N - 1));
			}

			else {
				System.out.println(s.substring(0, N - 1));
			}
//		char h = (char)(5);
//		System.out.println(h);
		}

	}

}


import java.util.Scanner;

public class MinimizingTheSreing {
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scn = new Scanner(System.in);
		int N = scn.nextInt();
		String s = scn.next();
		if (N == 1) {
			if (s.charAt(0) != 'a') {
				System.out.println("a");
			} else {
				System.out.println("");
			}
		} else {
			int check = 0;
			int idx = -1;
			for (int i = 0; i < N - 1; i++) {
				char ch1 = s.charAt(i);
				char ch2 = s.charAt(i + 1);
				if ((int) ch2 < (int) ch1) {
					check++;
					idx = i;
					break;
				}

			}
			// abdahdjha
			if (check > 0) {
				System.out.println(s.substring(0, idx) + s.substring(idx + 1));
			} else {
				System.out.println(s.substring(0, N - 1));
			}
		}
	}
}


import java.util.Scanner;

public class MinimizingTheSreing {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scn = new Scanner(System.in);
		int N = scn.nextInt();
		String s = scn.next();
		if (N == 1) {
			if (s.charAt(0) != 'a') {
				System.out.println("a");
			} else {
				System.out.println("");
			}
		} else {
			String ans = "";
			int check = 0;
			int done = 1;
			for (int i = 0; i < N - 1; i++) {
				char ch1 = s.charAt(i);
				char ch2 = s.charAt(i + 1);
				if ((int) ch2 < (int) ch1 && done > 0) {
					check++;
					done--;
				} else {
					ans = ans + ch1;
				}
			}
			if (check > 0) {
				System.out.println(ans + s.charAt(N - 1));
			}

			else {
				System.out.println(s.substring(0, N - 1));
			}
//		char h = (char)(5);
//		System.out.println(h);
		}

	}

}


import java.util.Scanner;

public class MinimizingTheSreing {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scn = new Scanner(System.in);
		int N = scn.nextInt();
		String s = scn.next();
		if (N == 1) {
			if (s.charAt(0) != 'a') {
				System.out.println("a");
			} else {
				System.out.println("");
			}
		} else {

			System.out.println(s.substring(0, N - 1));

		}

	}

}


import java.util.*;
import java.lang.Math;

public class A {

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

        boolean open = true;
        char[] arr = sc.nextLine().toCharArray();
        String res = "";
        for (int i=0; i<n; i++) {
            if (i < n-1) {
                if (open && arr[i] > arr[i + 1])
                    open = false;
                else
                    res += arr[i] + "";
            } else if (!open)
                res += arr[i] + "";
        }

        System.out.println(res);
    }
}


import java.util.*;
import java.lang.Math;

public class A {

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

        boolean open = true;
        char[] arr = sc.nextLine().toCharArray();
        for (int i=0; i<n-1; i++) {
            if (i < n-1) {
                if (open && arr[i] > arr[i +1])
                    open = false;
                else
                    System.out.print(Character.toString(arr[i]));
            } else if (!open)
                System.out.print(Character.toString(arr[i]));
        }
        System.out.println("");
    }
}


import java.util.*;
import java.lang.Math;

public class A {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        sc.nextLine();
        int di = n-1;
        char[] arr = sc.nextLine().toCharArray();
        for (int i=0; i<n-1; i++) {
            if (arr[i] > arr[i+1]) {
                di = i;
                break;
            }
        }

        String res = "";
        for (int i = 0; i<n; i++) {
            if (i == di)
                continue;
            res += arr[i] + "";
        }
        System.out.println(res);
    }
}


import java.util.*;
import java.lang.Math;

public class A {

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

        boolean open = true;
        char[] arr = sc.nextLine().toCharArray();
        for (int i=0; i<n; i++) {
            if (i < n-1) {
                if (open && arr[i] > arr[i +1])
                    open = false;
                else
                    System.out.print(Character.toString(arr[i]));
            } else if (!open)
                System.out.print(Character.toString(arr[i]));
        }
        System.out.println("");
    }
}


import java.util.*;
import java.lang.Math;

public class A {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        sc.nextLine();
        char[] arr = sc.nextLine().toCharArray();

        char max = '1';
        int maxi = 0;
        for (int i = 0; i<n; i++) {
            if (max == '1' || arr[i] > max) {
                max = arr[i];
                maxi = i;
            }
        }

        String res = "";
        for (int i = 0; i<n; i++) {
            if (i == maxi)
                continue;
            res += arr[i] + "";
        }
        System.out.println(res);
    }
}


import java.util.Scanner;

public class main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in = new Scanner(System.in);
		int t = in.nextInt();
		in.nextLine();
		String s = in.nextLine();
		StringBuilder temp = new StringBuilder(s);
		//temp.append(s);
		String min =temp.toString();
		for(int i = 0;i<s.length();i++) {
			StringBuilder temp2 = new StringBuilder(temp);
			temp2.deleteCharAt(i);
			if(temp2.toString().compareTo(min)<0) {
				min = temp2.toString();
			}
		}
		System.out.println(min);
	}

}


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

public class main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in = new Scanner(System.in);
		int t = in.nextInt();
		in.nextLine();
		String s = in.nextLine();
		StringBuilder temp = new StringBuilder(s);
		//temp.append(s);
		String min =temp.toString();
		ArrayList<String> st = new ArrayList<>();
		int dif = Integer.MIN_VALUE;
		int del = s.length()-1;
		for(int i = 0;i<s.length()-1;i++) {
			if(s.charAt(i)>s.charAt(i+1)&&s.charAt(i)-s.charAt(i+1)>dif)
			{
				dif = s.charAt(i)-s.charAt(i+1);
				del = i;
			}
		}
		temp.deleteCharAt(del);

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

}


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

public class main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in = new Scanner(System.in);
		int t = in.nextInt();
		in.nextLine();
		String s = in.nextLine();
		StringBuilder temp = new StringBuilder(s);
		//temp.append(s);
		String min =temp.toString();
		ArrayList<String> st = new ArrayList<>();
		int dif = Integer.MIN_VALUE;
		int del = s.length()-1;
		for(int i = 0;i<s.length()-1;i++) {
			if(s.charAt(i)>s.charAt(i+1)&&s.charAt(i)-s.charAt(i+1)>dif)
			{
				dif = s.charAt(i)-s.charAt(i+1);
				del = i;
				break;
			}
		}
		temp.deleteCharAt(del);

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

}


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

public class main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in = new Scanner(System.in);
		int t = in.nextInt();
		in.nextLine();
		String s = in.nextLine();
		StringBuilder temp = new StringBuilder(s);
		//temp.append(s);
		String min =temp.toString();
		ArrayList<String> st = new ArrayList<>();
		for(int i = 0;i<s.length();i++) {
			char c = temp.charAt(i);
			temp.deleteCharAt(i);
			st.add(temp.toString());
			temp.insert(i, c);
		}
		Collections.sort(st);
		System.out.println(st.get(0));
	}

}


import java.util.*;
import java.io.*;
public class a{
    static Scanner sc=new Scanner(System.in);

    public static void main(String [] args){
        int n=sc.nextInt();
        String s=sc.next();
        StringBuilder ss=new StringBuilder("");
        boolean found=false;
       for(int i=0;i<n-1;i++){
           if(s.charAt(i)>s.charAt(i+1)){
               found=true;
           }else{
               ss.append(s.charAt(i));
           }
       }
       if(found)ss.append(s.charAt(n-1));
       System.out.println(ss.toString());

    }
}


import java.util.*;
import java.io.*;
public class a{
    static Scanner sc=new Scanner(System.in);

    public static void main(String [] args){
        int n=sc.nextInt();
        String s=sc.next();
        char c='a';
        for(int i=0;i<n;i++){
            if(s.charAt(i)>c){
                c=s.charAt(i);
            }
        }
        StringBuilder ss=new StringBuilder("");
        boolean add=false;
        for(int i=0;i<n;i++){
            if(s.charAt(i)!=c||add){
                ss.append(s.charAt(i));
            }
            else{
                add=true;
            }
        }
        System.out.println(ss.toString());

    }
}


import java.util.*;
import java.io.*;
public class a{
    static Scanner sc=new Scanner(System.in);

    public static void main(String [] args){
        int n=sc.nextInt();
        String s=sc.next();
        StringBuilder ss=new StringBuilder("");
        boolean found=false;
       for(int i=0;i<n-1;i++){
           if(s.charAt(i)>s.charAt(i+1) && !found){
               found=true;
           }else{
               ss.append(s.charAt(i));
           }
       }
       if(found)ss.append(s.charAt(n-1));
       System.out.println(ss.toString());

    }
}


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;
        boolean v = false;
        for (int i = 0; i < n - 1; i++) {
            if (cad.charAt(i) <= cad.charAt(i + 1) || v) {
                pw.print(cad.charAt(i));
            } else {
                v = true;
            }
        }
        if (v) {
            pw.println(cad.charAt(n - 1));
        } else {
            pw.println();
        }
        pw.close();
    }

    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;
            String rta = "";
            for (int i = 0; i < s.length(); i++) {
                if (i != s.length() - 1 && s.charAt(i) > s.charAt(i + 1) && !cond) {
                    cond = true;
                    continue;
                }
                rta += s.charAt(i);
            }
            if(rta.length()==s.length()||set.size()==1){
                System.out.println(s.substring(0, s.length()-1));
            }else{
                System.out.println(rta);
            }
    }
}


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 (i != s.length() - 1 && s.charAt(i) > s.charAt(i + 1) && !cond) {
                    cond = true;
                    continue;
                }
                System.out.print(s.charAt(i));
            }
            System.out.println();
        }
    }
}


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;
        for (int i = 0; i < n; i++) {
            char x = cad.charAt(i);
            if (x > mayor) {
                mayor = x;
            }
        }
        System.out.println(cad.replaceFirst(String.valueOf(mayor), ""));

    }

    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;
        StringBuilder rta = new StringBuilder("");
        for (int i = 0; i < s.length(); i++) {
            if (i != s.length() - 1 && s.charAt(i) > s.charAt(i + 1) && !cond) {
                cond = true;
                continue;
            }
            rta.append(s.charAt(i));
        }
        if (rta.length() == s.length() || set.size() == 1) {
            System.out.println(s.substring(0, s.length() - 1));
        } else {
            System.out.println(rta);
        }
    }
}