#include #define MAXN 100000 int next[MAXN],bgn[MAXN],first[MAXN],f[MAXN]; int ans,maxn,tot; int max(int a,int b) { return a>b?a:b; } void add_edge(int a,int b) { tot++; next[tot]=first[a]; first[a]=tot; bgn[tot]=b; } int main(void) { int n; scanf("%d",&n); for (int i=0;i