module.exports=function(r){var t={};function n(e){if(t[e])return t[e].exports;var o=t[e]={i:e,l:!1,exports:{}};return r[e].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=r,n.c=t,n.d=function(r,t,e){n.o(r,t)||Object.defineProperty(r,t,{enumerable:!0,get:e})},n.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,t){if(1&t&&(r=n(r)),8&t)return r;if(4&t&&"object"==typeof r&&r&&r.__esModule)return r;var e=Object.create(null);if(n.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:r}),2&t&&"string"!=typeof r)for(var o in r)n.d(e,o,function(t){return r[t]}.bind(null,o));return e},n.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(t,"a",t),t},n.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},n.p="",n(n.s=0)}([function(r,t,n){"use strict";var e=n(1);n(2)(e.readFileSync("/dev/stdin","utf8"))},function(r,t){r.exports=require("fs")},function(r,t,n){"use strict";var e=n(3),o=n(5);r.exports=function(r){var t=new e(r);o(t)}},function(r,t,n){"use strict";var e=n(4);r.exports=class{constructor(r){var t=r.trim().split(/\s+/g);this.inp=new e(t)}inr(){return this.inp.deq()}in(){return parseInt(this.inp.deq(),10)}fin(){this.inp.clear()}}},function(r,t,n){"use strict";r.exports=class{constructor(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.size=r.length,this.items=r,this.ind=0}enq(r){this.size+=1,this.items.push(r)}deq(){var r=this.items[this.ind];return this.size-=1,this.ind+=1,r}clear(){this.items=[],this.size=0,this.ind=0}}},function(r,t,n){"use strict";var e=n(6).FindBridge;r.exports=function(r){for(var t=r.in(),n=r.in(),o=new Array(t),i=0;i<t;i++)o[i]=[];for(var f=0;f<n;f++){var u=r.in(),a=r.in();o[u].push(a),o[a].push(u)}for(var s=e(o),l=0;l<s.length;l++)if(s[l].from>s[l].to){var v=s[l].from;s[l].from=s[l].to,s[l].to=v}s.sort(function(r,t){return r.from>t.from?1:r.from<t.from?-1:r.to>t.to?1:r.to<t.to?-1:0});for(var c=0;c<s.length;c++)console.log(`${s[c].from} ${s[c].to}`)}},function(r,t,n){"use strict";r.exports={FindAP:function(r){for(var t=r.length,n=new Array(t).fill(-1),e=new Array(t).fill(-1),o=new Array(t).fill(0),i=[{v:0,p:-1}],f=[],u=0;i.length>0;){var a=i.pop();-1==n[a.v]?(-1!=a.p&&f.push({from:a.p,to:a.v,isF:!0}),n[a.v]=u++,e[a.v]=n[a.v]):f.push({from:a.v,to:a.p,isF:!1});for(var s=r[a.v].length,l=0;l<s;l++){var v=r[a.v][l];-1==n[v]&&i.push({v:v,p:a.v})}}for(var c=0;f.length>0;){var p=f.pop();p.isF?(0==p.from&&c++,e[p.from]=Math.min(e[p.from],e[p.to]),0!=p.from&&n[p.from]<=e[p.to]&&(o[p.from]=1)):e[p.from]=Math.min(e[p.from],n[p.to])}return c>1&&(o[0]=1),o},FindAP_R:function(r){var t=r.length,n=new Array(t).fill(-1),e=new Array(t).fill(-1),o=new Array(t).fill(0);return function t(i,f,u){n[i]=u++,e[i]=n[i];var a=0,s=!0,l=!1,v=void 0;try{for(var c,p=r[i][Symbol.iterator]();!(s=(c=p.next()).done);s=!0){var h=c.value;-1==n[h]?(a++,e[i]=Math.min(e[i],t(h,i,u)),0!=i&&n[i]<=e[h]&&(o[i]=1)):f!=h&&(e[i]=Math.min(e[i],n[h]))}}catch(r){l=!0,v=r}finally{try{s||null==p.return||p.return()}finally{if(l)throw v}}return 0==i&&a>1&&(o[0]=1),e[i]}(0,-1,0),o},FindBridge:function(r){for(var t=r.length,n=new Array(t).fill(-1),e=new Array(t).fill(-1),o=[],i=[{v:0,p:-1}],f=[],u=0;i.length>0;){var a=i.pop();-1==n[a.v]?(-1!=a.p&&f.push({from:a.p,to:a.v,isF:!0}),n[a.v]=u++,e[a.v]=n[a.v]):f.push({from:a.v,to:a.p,isF:!1});for(var s=r[a.v].length,l=0;l<s;l++){var v=r[a.v][l];-1==n[v]&&i.push({v:v,p:a.v})}}for(;f.length>0;){var c=f.pop();c.isF?(e[c.from]=Math.min(e[c.from],e[c.to]),n[c.from]<e[c.to]&&o.push({from:c.from,to:c.to})):e[c.from]=Math.min(e[c.from],n[c.to])}return o},FindBridge_R:function(r){var t=r.length,n=new Array(t).fill(-1),e=new Array(t).fill(-1),o=[];return function t(i,f,u){n[i]=u++,e[i]=n[i];var a=!0,s=!1,l=void 0;try{for(var v,c=r[i][Symbol.iterator]();!(a=(v=c.next()).done);a=!0){var p=v.value;if(-1==n[p])e[i]=Math.min(e[i],t(p,i,u)),e[p]==n[p]&&o.push({from:i,to:p});else{if(f==p)continue;e[i]=Math.min(e[i],e[p])}}}catch(r){s=!0,l=r}finally{try{a||null==c.return||c.return()}finally{if(s)throw l}}return e[i]}(0,0,0),o}}}]);


Measured memory_bytes: 34588