class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: D = None
        self.o: D = None
        self.p: B = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: D = None
        self.z: D = None
        self.s: B = None
        self.q: C = None
        self.txt = txt

a = A("a")
h = B("h")
k = C("k")
b = D("b")
n = E("n")
l = F("l")
j = D("j")

a.s = b
a.q = b
a.o = j
a.p = h
h.o = n
h.q = j
h.t = k
k.w = n
k.q = h
b.z = l
n.s = j
n.q = k
n.z = a
n.w = a
n.u = l
n.o = h
l.t = k
l.q = k
l.u = b
l.z = j
l.s = h
j.z = l
assert h.t.w.u.txt == "
class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: D = None
        self.o: D = None
        self.p: B = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: D = None
        self.z: D = None
        self.s: B = None
        self.q: C = None
        self.txt = txt

a = A("a")
h = B("h")
k = C("k")
b = D("b")
n = E("n")
l = F("l")
j = D("j")

a.s = b
a.q = b
a.o = j
a.p = h
h.o = n
h.q = j
h.t = k
k.w = n
k.q = h
b.z = l
n.s = j
n.q = k
n.z = a
n.w = a
n.u = l
n.o = h
l.t = k
l.q = k
l.u = b
l.z = j
l.s = h
j.z = l
assert h.t.w.u.txt == "l"