Program to find the closure of an attribute