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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: B = None
        self.txt = txt

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

g.q = h
g.r = c
g.z = c
g.y = i
g.s = a
m.z = h
m.q = h
m.w = a
m.v = a
i.z = c
i.r = c
i.o = b
i.t = h
i.p = m
l.s = c
l.y = a
l.w = a
l.p = h
h.s = g
h.u = m
f.q = h
f.r = c
f.z = c
f.y = i
f.s = m
b.q = h
b.r = l
b.z = c
b.y = i
b.s = a
c.s = l
c.y = a
c.w = a
c.p = h
a.z = h
a.q = h
a.w = m
a.v = m
assert h.s.s.z.s.y.txt == "i"