class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: A = None
        self.t: B = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

h.o = m
h.p = j
h.w = j
h.t = c
d.p = h
d.x = a
i.y = m
i.q = h
f.u = i
f.y = d
f.t = g
g.q = f
g.o = f
g.s = f
j.o = g
j.p = h
j.w = h
j.t = d
c.p = j
c.x = a
a.y = g
a.q = h
l.q = f
l.o = f
l.s = f
m.q = f
m.o = f
m.s = f
assert i.q.o.q.u.y.s.t.q.t.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: A = None
        self.t: B = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

h.o = m
h.p = j
h.w = j
h.t = c
d.p = h
d.x = a
i.y = m
i.q = h
f.u = i
f.y = d
f.t = g
g.q = f
g.o = f
g.s = f
j.o = g
j.p = h
j.w = h
j.t = d
c.p = j
c.x = a
a.y = g
a.q = h
l.q = f
l.o = f
l.s = f
m.q = f
m.o = f
m.s = f
assert i.q.o.q.u.y.s.t.q.t.txt == "g"