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

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

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

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

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

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

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

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

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

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

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

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

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

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

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