```
class Packet
  def initialize(name, age, number, array)
    @name = name
    @age = age
    @number = number
    @neighbors = array
  end 
end

p1 = Packet.new("n1", 5, 2, [1,2,3,4])

puts p1.name

```

I have the above code, but whenever I execute the puts statement I get the error that name is not a method.

I don't know any other way to print the name of p1. 

How to print name?