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

class B:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: D = None
        self.p: D = None
        self.x: D = None
        self.txt = txt

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

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

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

h = A("h")
m = B("m")
a = C("a")
g = D("g")
b = E("b")
i = D("i")
c = B("c")
j = A("j")

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

class B:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: D = None
        self.p: D = None
        self.x: D = None
        self.txt = txt

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

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

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

h = A("h")
m = B("m")
a = C("a")
g = D("g")
b = E("b")
i = D("i")
c = B("c")
j = A("j")

h.u = c
h.q = a
h.r = i
h.s = i
m.s = c
m.o = g
m.p = g
m.x = i
a.y = j
a.r = i
a.o = g
a.t = g
a.s = m
g.r = i
g.u = i
g.p = a
b.v = c
i.r = g
i.u = g
i.p = a
c.s = m
c.o = i
c.p = g
c.x = g
j.u = m
j.q = a
j.r = i
j.s = i
assert b.v.x.p.t.u.p.t.u.txt == "i"