class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: E = None
        self.r: E = None
        self.v: D = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

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

e.q = j
e.s = i
e.r = i
e.v = m
e.z = b
b.o = i
b.v = i
b.s = j
b.u = j
j.z = i
m.w = b
m.z = b
m.q = i
m.v = j
m.o = j
i.s = a
a.s = e
a.z = m
a.y = b
assert j.z.s.z.z.txt == "
class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: E = None
        self.r: E = None
        self.v: D = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

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

e.q = j
e.s = i
e.r = i
e.v = m
e.z = b
b.o = i
b.v = i
b.s = j
b.u = j
j.z = i
m.w = b
m.z = b
m.q = i
m.v = j
m.o = j
i.s = a
a.s = e
a.z = m
a.y = b
assert j.z.s.z.z.txt == "b"