class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: B = None
        self.t: A = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: B = None
        self.t: A = None
        self.y: A = None
        self.txt = txt

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

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