(set! *unchecked-math* true)
(defn input []
  (let [[N M] (->> (clojure.string/split (read-line) #"\s")
                (map #(Integer/parseInt %)))]
    (list N M
      (->> (repeatedly M read-line)
        (sequence
          (comp (map #(clojure.string/split % #"\s"))
            (map (partial mapv #(Integer/parseInt %)))))))))

(defn CoutningRoads [^"[I" Array Rs]
  (doseq [r Rs
          :let [id1 (unchecked-dec-int (r 0))
                id2 (unchecked-dec-int (r 1))]]
    (do
      (->> (aget ^"[I" Array id1)
        unchecked-inc-int
        (aset ^"[I" Array id1))
      (->> (aget ^"[I" Array id2)
        unchecked-inc-int
        (aset ^"[I" Array id2)))))

(defn output [^"[I" Array]
  (->> Array
    (transduce (map #(format "%s\n" %)) str "")
    print))

(let [[N _ Rs] (input)]
  (doto (int-array N (int 0))
    (CoutningRoads Rs)
    (output)))