for _, side in ipairs(peripheral.getNames()) do
    print(side, peripheral.getType(side))
end