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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: D = None
        self.v: E = None
        self.y: E = None
        self.w: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: D = None
        self.w: C = None
        self.s: D = None
        self.o: B = None
        self.txt = txt

e = A("e")
a = B("a")
j = C("j")
d = D("d")
i = E("i")
k = C("k")

e.q = i
e.r = d
e.x = j
a.r = e
a.v = d
a.x = i
j.q = e
j.u = d
j.w = d
j.v = i
j.y = i
d.o = a
d.u = j
d.y = k
d.q = i
d.p = i
i.y = k
i.w = k
i.p = d
i.s = d
i.o = a
k.q = e
k.u = d
k.w = d
k.v = i
k.y = i
assert d.y.w.u.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: D = None
        self.x: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: D = None
        self.v: E = None
        self.y: E = None
        self.w: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: D = None
        self.w: C = None
        self.s: D = None
        self.o: B = None
        self.txt = txt

e = A("e")
a = B("a")
j = C("j")
d = D("d")
i = E("i")
k = C("k")

e.q = i
e.r = d
e.x = j
a.r = e
a.v = d
a.x = i
j.q = e
j.u = d
j.w = d
j.v = i
j.y = i
d.o = a
d.u = j
d.y = k
d.q = i
d.p = i
i.y = k
i.w = k
i.p = d
i.s = d
i.o = a
k.q = e
k.u = d
k.w = d
k.v = i
k.y = i
assert d.y.w.u.txt == "j"