#include<cstdio>
#include<cstring>using namespace std;int main()
{char str1[100],str2[100];bool hashTable[128] ={false};//用来标记字符是否被输出过//gets(str1);//gets(str2);fgets(str1,100,stdin);//c++14以后gets函数完全被移除了,不能使用,用 char * fgets ( char * str, int num, FILE * stream );fgets(str2,100,stdin);int length1 = strlen(str1);int length2 = strlen(str2);for(int i = 0;i<length1;i++)//枚举{int j;char ch1,ch2;ch1 = str1[i];for(j = 0;j<length2;j++){ch2 = str2[j];if(ch1>='a'&&ch1<='z') ch1 -=32;//小写字母变为大写if(ch2>='a'&&ch2<='z') ch2 -=32;if(ch1 == ch2) break;}if(j ==length2 &&hashTable[ch1]==false)//如果在第二个字符串中未出现过ch1,且ch1未被输出过{printf("%c",ch1);hashTable[ch1] = true;}}return 0;
}