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

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

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

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

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

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

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

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

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

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

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

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

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

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

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