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

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

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

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

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

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

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

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

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

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

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

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

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