class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: F = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: A = None
        self.q: B = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: A = None
        self.q: B = None
        self.u: B = None
        self.txt = txt

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

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