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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: B = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: B = None
        self.z: D = None
        self.txt = txt

e = A("e")
g = B("g")
c = C("c")
m = D("m")
a = E("a")
j = F("j")
b = E("b")
f = B("f")
i = F("i")
k = D("k")

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: B = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: B = None
        self.z: D = None
        self.txt = txt

e = A("e")
g = B("g")
c = C("c")
m = D("m")
a = E("a")
j = F("j")
b = E("b")
f = B("f")
i = F("i")
k = D("k")

e.x = g
e.z = m
g.w = j
g.o = f
g.s = a
c.w = e
m.o = e
m.t = b
a.v = c
a.q = c
a.p = c
a.u = k
a.y = i
a.o = b
j.y = g
j.u = f
j.z = m
b.v = c
b.q = c
b.p = c
b.u = k
b.y = j
b.o = a
f.w = i
f.o = g
f.s = b
i.y = g
i.u = f
i.z = m
k.o = e
k.t = b
assert k.t.y.z.t.v.txt == "c"