function Dog (name) {
this.name = name;
}
Dog.prototype.walk = function () {
print(this.name + " is walking with four legs!");
};
var john = new Dog("John");
john.walk();
ZnVuY3Rpb24gRG9nIChuYW1lKSB7CiAgICB0aGlzLm5hbWUgPSBuYW1lOwp9CiAKRG9nLnByb3RvdHlwZS53YWxrID0gZnVuY3Rpb24gKCkgewogICAgcHJpbnQodGhpcy5uYW1lICsgIiBpcyB3YWxraW5nIHdpdGggZm91ciBsZWdzISIpOwp9OwogCnZhciBqb2huID0gbmV3IERvZygiSm9obiIpOwpqb2huLndhbGsoKTs=