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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: C = None
        self.txt = txt

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

e.x = j
e.q = j
e.w = j
e.p = c
e.s = i
l.p = j
l.x = j
l.v = c
c.s = i
c.q = i
i.t = d
d.u = c
d.p = c
b.p = e
b.x = e
b.v = c
j.x = e
j.q = e
j.w = e
j.p = c
j.s = i
h.p = j
h.x = j
h.v = c
a.t = d
assert c.q.t.u.q.t.u.txt == "
class A:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: C = None
        self.q: A = None
        self.w: A = None
        self.s: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: C = None
        self.txt = txt

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

e.x = j
e.q = j
e.w = j
e.p = c
e.s = i
l.p = j
l.x = j
l.v = c
c.s = i
c.q = i
i.t = d
d.u = c
d.p = c
b.p = e
b.x = e
b.v = c
j.x = e
j.q = e
j.w = e
j.p = c
j.s = i
h.p = j
h.x = j
h.v = c
a.t = d
assert c.q.t.u.q.t.u.txt == "c"