#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
const int maxn=200010;
int n,m,p;
int f[maxn],siz[maxn],F[maxn];
int sum;
struct node
{
int ch[2],fa,rev;
}s[maxn];
int Find(int x)
{
return (F[x]==x)?x:(F[x]=Find(F[x]));
}
int find(int x)
{
return (f[x]==x)?x:(f[x]=find(f[x]));
}
bool isr(int x) {return s[find(s[x].fa)].ch[0]!=x&&s[find(s[x].fa)].ch[1]!=x;}
void pushdown(int x)
{
if(s[x].rev)
{
swap(s[x].ch[0],s[x].ch[1]);
if(s[x].ch[0]) s[s[x].ch[0]].rev^=1;
if(s[x].ch[1]) s[s[x].ch[1]].rev^=1;
s[x].rev=0;
}
}
void updata(int x)
{
if(!isr(x)) updata(find(s[x].fa));
pushdown(x);
}
void rotate(int x)
{
int y=find(s[x].fa),z=find(s[y].fa),d=(x==s[y].ch[1]);
if(!isr(y)) s[z].ch[y==s[z].ch[1]]=x;
s[y].fa=x,s[x].fa=z,s[y].ch[d]=s[x].ch[d^1];
if(s[x].ch[d^1]) s[s[x].ch[d^1]].fa=y;
s[x].ch[d^1]=y;
}
void splay(int x)
{
updata(x);
while(!isr(x))
{
int y=find(s[x].fa),z=find(s[y].fa);
if(!isr(y))
{
if((x==s[y].ch[0])^(y==s[z].ch[0])) rotate(x);
else rotate(y);
}
rotate(x);
}
}
void access(int x)
{
for(int y=0;x;splay(x),s[x].ch[1]=y,s[y].fa=x,y=x,x=find(s[x].fa));
}
void maker(int x)
{
access(x),splay(x),s[x].rev^=1;
}
void link(int x,int y)
{
maker(x),s[x].fa=y;
}
void dfs(int x,int y)
{
if(!x) return ;
sum+=siz[x];
if(x!=y) siz[y]+=siz[x],f[x]=y;
dfs(s[x].ch[0],y),dfs(s[x].ch[1],y);
}
inline int rd()
{
int ret=0,f=1; char gc=getchar();
while(gc<‘0‘||gc>‘9‘) {if(gc==‘-‘)f=-f; gc=getchar();}
while(gc>=‘0‘&&gc<=‘9‘) ret=ret*10+gc-‘0‘,gc=getchar();
return ret*f;
}
void add(int a,int b)
{
sum=0;
if(Find(a)!=Find(b))
{
F[F[a]]=F[b];
link(a,b);
}
else
{
maker(a),access(b),splay(b),dfs(b,b),s[b].ch[0]=s[b].ch[1]=0;
}
}
int main()
{
n=rd(),m=rd(),p=rd();
int i,a,b;
for(i=1;i<=n;i++) F[i]=f[i]=i,siz[i]=1;
for(i=1;i<=m;i++) a=find(rd()),b=find(rd()),add(a,b);
for(i=1;i<=p;i++)
{
a=find(rd()),b=find(rd()),add(a,b);
if(!sum) printf("No\n");
else printf("%d\n",sum);
}
return 0;
}//5 3 4 1 2 4 3 4 5 2 3 1 3 4 5 2 4