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

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

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	class LoggedExchange {}
	List<UnaryOperator<LoggedExchange>> transforms;
	public LoggedExchange transform(LoggedExchange original) {
		return transforms.stream().reduce(UnaryOperator.identity(), (a, b) -> ((LoggedExchange o) -> b.apply(a.apply(o)))).apply(original);
	}
}