/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

import sun.misc.Unsafe;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		new Accessor().run();
	}
}

class Data{
    int x = 0;
}

class Accessor{
	private Data data;
	private Object base;
	private long off;
	public static final Unsafe unsafe;
	
	public void run(){
	    data = new Data();
	    
	    base = data;
	    off = 12;
	
	    unsafe.putInt(base,off,1);
	    assert(data.x == 1);
	}

    static{
        try {
            Constructor<Unsafe> unsafeConstructor = Unsafe.class.getDeclaredConstructor();
            unsafeConstructor.setAccessible(true);
            unsafe = unsafeConstructor.newInstance();
        } catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException | InstantiationException e) {
            throw new RuntimeException(e);
        }
    }
}
