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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: A = None
        self.s: F = None
        self.y: B = None
        self.r: D = None
        self.q: C = None
        self.txt = txt

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

k.t = n
b.s = i
b.t = j
b.z = h
b.u = n
b.w = e
j.t = n
j.s = n
h.o = k
h.s = e
h.p = j
n.x = h
a.x = h
a.r = h
a.p = k
a.s = e
a.y = b
a.q = j
e.x = h
e.r = h
e.p = k
e.s = a
e.y = b
e.q = j
i.x = h
assert k.t.x.s.q.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: A = None
        self.s: F = None
        self.y: B = None
        self.r: D = None
        self.q: C = None
        self.txt = txt

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

k.t = n
b.s = i
b.t = j
b.z = h
b.u = n
b.w = e
j.t = n
j.s = n
h.o = k
h.s = e
h.p = j
n.x = h
a.x = h
a.r = h
a.p = k
a.s = e
a.y = b
a.q = j
e.x = h
e.r = h
e.p = k
e.s = a
e.y = b
e.q = j
i.x = h
assert k.t.x.s.q.txt == "j"