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

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: F = None
        self.y: F = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

j = A("j")
d = B("d")
b = C("b")
c = D("c")
l = E("l")
f = F("f")
g = B("g")
e = D("e")
k = F("k")

j.u = f
j.z = g
j.v = c
j.w = b
d.o = l
b.t = k
b.r = k
b.p = k
b.y = f
c.o = k
l.t = k
l.u = k
l.p = e
l.z = e
l.v = j
f.z = j
f.u = e
g.o = l
e.o = k
k.z = j
k.u = c
assert b.y.z.z.o.t.u.o.txt == "
class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: B = None
        self.v: D = None
        self.w: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: F = None
        self.y: F = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

j = A("j")
d = B("d")
b = C("b")
c = D("c")
l = E("l")
f = F("f")
g = B("g")
e = D("e")
k = F("k")

j.u = f
j.z = g
j.v = c
j.w = b
d.o = l
b.t = k
b.r = k
b.p = k
b.y = f
c.o = k
l.t = k
l.u = k
l.p = e
l.z = e
l.v = j
f.z = j
f.u = e
g.o = l
e.o = k
k.z = j
k.u = c
assert b.y.z.z.o.t.u.o.txt == "k"