class UnionFind
  def initialize(n)
    @par = (0..n).to_a
    @rank = Array.new(n + 1, 0)
  end
  def root(x)
    @par[x] == x ? x : @par[x] = root(@par[x])
  end
  def par
    @par
  end
  def unite(x, y)
    ux = root(x)
    uy = root(y)
    if @rank[ux] < @rank[uy]
      @par[ux] = uy
    else
      @par[uy] = ux
      @rank[ux] += 1 if @rank[ux] == @rank[uy]
    end
  end  
end

n, m = gets.split.map(&:to_i)
u = UnionFind.new(n)
m.times do
  a, b = gets.split.map(&:to_i)
  u.unite(a, b)
end
puts u.par[1..n].count(u.par[1..n].group_by{ |e| e }.sort_by{ |k, v| -v.size}.map(&:first).first)
