class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: G = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: D = None
        self.y: D = None
        self.w: C = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: H = None
        self.s: B = None
        self.q: D = None
        self.u: E = None
        self.o: F = None
        self.y: H = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: G = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: A = None
        self.v: C = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: H = None
        self.y: E = None
        self.q: H = None
        self.x: F = None
        self.z: A = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

n = A("n")
d = B("d")
k = C("k")
e = D("e")
i = E("i")
g = F("g")
b = G("b")
f = H("f")

n.y = b
n.t = b
n.u = e
d.q = i
d.p = e
d.y = e
d.w = k
d.u = k
k.z = i
k.u = i
k.r = f
k.y = f
k.s = d
k.t = d
k.q = e
k.o = g
e.v = n
i.x = f
i.p = b
i.w = d
g.y = e
g.q = n
g.v = k
g.w = i
b.u = g
b.x = g
b.p = f
b.q = f
b.y = i
b.r = i
b.z = n
f.t = n
assert n.u.v.y.q.t.txt == "
class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: G = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: D = None
        self.y: D = None
        self.w: C = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: H = None
        self.s: B = None
        self.q: D = None
        self.u: E = None
        self.o: F = None
        self.y: H = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: G = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: A = None
        self.v: C = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: H = None
        self.y: E = None
        self.q: H = None
        self.x: F = None
        self.z: A = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

n = A("n")
d = B("d")
k = C("k")
e = D("e")
i = E("i")
g = F("g")
b = G("b")
f = H("f")

n.y = b
n.t = b
n.u = e
d.q = i
d.p = e
d.y = e
d.w = k
d.u = k
k.z = i
k.u = i
k.r = f
k.y = f
k.s = d
k.t = d
k.q = e
k.o = g
e.v = n
i.x = f
i.p = b
i.w = d
g.y = e
g.q = n
g.v = k
g.w = i
b.u = g
b.x = g
b.p = f
b.q = f
b.y = i
b.r = i
b.z = n
f.t = n
assert n.u.v.y.q.t.txt == "n"