class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: F = None
        self.t: F = None
        self.w: D = None
        self.p: F = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: C = None
        self.w: D = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: E = None
        self.z: C = None
        self.txt = txt

c = A("c")
e = B("e")
d = C("d")
i = D("i")
f = E("f")
a = F("a")
g = C("g")
h = B("h")
b = A("b")
n = F("n")

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: C = None
        self.w: D = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: E = None
        self.z: C = None
        self.txt = txt

c = A("c")
e = B("e")
d = C("d")
i = D("i")
f = E("f")
a = F("a")
g = C("g")
h = B("h")
b = A("b")
n = F("n")

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