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

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: B = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: E = None
        self.u: B = None
        self.o: B = None
        self.v: C = None
        self.y: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: E = None
        self.v: B = None
        self.txt = txt

i = A("i")
k = B("k")
a = C("a")
h = D("h")
g = E("g")
f = F("f")
c = E("c")
j = B("j")
n = E("n")

i.w = k
i.v = n
i.z = h
k.v = a
a.t = f
a.u = j
a.x = h
h.x = a
h.v = a
h.y = a
h.z = g
h.u = j
h.o = k
g.o = j
g.y = a
g.w = a
g.q = a
g.p = f
g.z = h
f.z = h
f.t = c
f.v = j
c.o = j
c.y = a
c.w = a
c.q = a
c.p = f
c.z = h
j.v = a
n.o = k
n.y = a
n.w = a
n.q = a
n.p = f
n.z = h
assert h.u.v.t.v.v.t.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: E = None
        self.z: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: B = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: E = None
        self.u: B = None
        self.o: B = None
        self.v: C = None
        self.y: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: E = None
        self.v: B = None
        self.txt = txt

i = A("i")
k = B("k")
a = C("a")
h = D("h")
g = E("g")
f = F("f")
c = E("c")
j = B("j")
n = E("n")

i.w = k
i.v = n
i.z = h
k.v = a
a.t = f
a.u = j
a.x = h
h.x = a
h.v = a
h.y = a
h.z = g
h.u = j
h.o = k
g.o = j
g.y = a
g.w = a
g.q = a
g.p = f
g.z = h
f.z = h
f.t = c
f.v = j
c.o = j
c.y = a
c.w = a
c.q = a
c.p = f
c.z = h
j.v = a
n.o = k
n.y = a
n.w = a
n.q = a
n.p = f
n.z = h
assert h.u.v.t.v.v.t.txt == "f"