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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: A = None
        self.q: F = None
        self.t: A = None
        self.w: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: A = None
        self.q: F = None
        self.t: A = None
        self.w: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: E = None
        self.txt = txt

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

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

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