#include <iostream>
#include <cstdint>
#include <new>
#include <type_traits>
using namespace std;
// Write your struct and placement new logic here
typedef struct{
int id;
int value;
}SensorPacket;
int main() {
int index, id, value;
cin >> index >> id >> value;
// Write your pool construction code here
using Storage = std::aligned_storage_t<
sizeof(SensorPacket),
alignof(SensorPacket)>;
Storage pool[3];
SensorPacket* s = new (&pool[index]) SensorPacket{id, value};
cout<<s->id<<" "<<s->value;
s->~SensorPacket();
return 0;
}