class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: D = None
        self.u: E = None
        self.z: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: C = None
        self.v: C = None
        self.r: E = None
        self.txt = txt

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

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

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

j.s = d
j.t = k
j.u = i
j.z = i
f.o = j
f.s = j
f.u = j
f.v = k
f.t = i
d.t = j
d.z = b
d.r = b
k.x = f
k.p = d
k.v = d
k.r = i
i.r = l
b.p = k
b.y = k
b.u = f
b.t = d
b.r = i
l.r = i
assert d.t.s.z.txt == "
class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: D = None
        self.u: E = None
        self.z: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: C = None
        self.v: C = None
        self.r: E = None
        self.txt = txt

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

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

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

j.s = d
j.t = k
j.u = i
j.z = i
f.o = j
f.s = j
f.u = j
f.v = k
f.t = i
d.t = j
d.z = b
d.r = b
k.x = f
k.p = d
k.v = d
k.r = i
i.r = l
b.p = k
b.y = k
b.u = f
b.t = d
b.r = i
l.r = i
assert d.t.s.z.txt == "b"