//#include <stdio.h>
//
//int main()
//{
// int arr[11][10] = {0};
// int i, j;
//
// for (i = 0; i < 11; i++)
// {
// for (j = 0; j < 10; j++)
// {
// scanf("%d", &arr[i][j]);
// }
// }
//
// for (i = 0; i < 10; i++)
// {
// if (arr[10][i] == 1)
// {
// for (j = 9; j >= 0 ; j--)
// {
// if (arr[j][i] > 0)
// {
// printf("%d crash\n", i + 1);
// break;
// }
// else if(arr[j][i] < 0)
// {
// printf("%d fall\n", i + 1);
// break;
// }
// }
//
// if (j==-1)
// {
// printf("%d safe\n", i + 1);
// }
//
// }
// }
//}
//
// step1: 반복문으로 적당히 잘 풀어보기
// step2: 주요 함수를 구현해보기
// step3: 함수 이용해서 문제 풀어보기
//#include<stdio.h>
//
//int main() {
// char word[1000] = {0};
// int i;
//// scanf("%s", word);
// gets(word);
//
// printf("%s", word);
//
// for(i=0; i<strlen(word); i++) {
// printf("%d:%c\n", i, word[i]);
// }
//}
/*
strcmp, strlen, strstr, strcpy
// strcmp: compre
// strlen: length
// strstr: inside str
// strcpy: copy
*/
/*
#include <stdio.h>
int main()
{
char word[100] = {0};
scanf("%s", word);
if(strcmp(word, "love") == 0)
{
printf("I love you.");
}
}
*/
/*
#include <stdio.h>
int main()
{
char word[19] = {0};
int i;
scanf("%s", word);
for (i = 0; i < strlen(word);i++)
{
printf("%c",word[i]+2);
}
printf("\n");
for ( i = 0; i < strlen(word);i++)
{
printf("%c",word[i]*7%80+48);
}
}
*/
/*
#include<stdio.h>
#include<string.h>
int main()
{
char word1[100] = {0};
char word2[100] = {0};
int i;
scanf("%s %s", word1, word2);
// a > b -> 1
// a < b -> -1
// a = b -> 0
if(strlen(word1) > strlen(word2))
{
printf("1");
}
else if(strlen(word1) < strlen(word2))
{
printf("-1");
}
else
{
for (i = 0; i <strlen(word1) ; i++)
{
if (word1[i] != word2[i])
{
if (word1[i] > word2[i])
{
printf("1");
break;
}
else if (word1[i] < word2[i])
{
printf("-1");
break;
}
}
}
if (i == strlen(word1))
{
printf("0");
}
}
}
*/
#include<stdio.h>
#include<string.h>
int main() {
char word1[1000] = {0}, search[1000] = {0};
int i,j;
scanf("%s %s", word1, search);
if(word1 < search)
{
printf("0");
}
else
{
for (i = 0;i < strlen(word1); i++)
{
for (j = 0; j < strlen(search); j++)
{
if (word1[i] == search[j])
{
break;
}
else
{
printf("0");
break;
}
}
if ()
{
printf("6421040");
break;
}
}
if (i == strlen(word1))
{
printf("0");
}
}
}