n, m = gets.split.map(&:to_i)
@par = (0..n).to_a
@rank = Array.new(n + 1, 0)
def root(x)
  @par[x] == x ? x : @par[x] = root(@par[x])
end
def unite(x, y)
  x = root(x)
  y = root(y)
  return if x == y
  if @rank[x] < @rank[y]
    @par[x] = y
  else
    @par[y] = x
    @rank[x] += 1 if @rank[x] == @rank[y]
  end
end
m.times do
  a, b = gets.split.map(&:to_i)
  unite(a, b)
end
puts @par.count(@par.group_by{ |e| e }.sort_by{ |k, v| -v.size}.map(&:first).first)
