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

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

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

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

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

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

e = A("e")
j = B("j")
c = C("c")
k = D("k")
i = E("i")
n = F("n")

e.q = i
e.w = i
e.p = c
e.o = k
e.t = k
j.q = n
j.z = k
j.s = k
j.t = c
j.w = i
c.y = n
k.o = e
k.r = j
i.v = j
n.o = c
n.y = k
n.r = j
assert c.y.r.s.r.w.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: C = None
        self.w: E = None
        self.o: D = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

e = A("e")
j = B("j")
c = C("c")
k = D("k")
i = E("i")
n = F("n")

e.q = i
e.w = i
e.p = c
e.o = k
e.t = k
j.q = n
j.z = k
j.s = k
j.t = c
j.w = i
c.y = n
k.o = e
k.r = j
i.v = j
n.o = c
n.y = k
n.r = j
assert c.y.r.s.r.w.txt == "i"