class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: H = None
        self.r: E = None
        self.q: F = None
        self.y: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: D = None
        self.o: F = None
        self.y: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: G = None
        self.v: H = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: F = None
        self.o: F = None
        self.t: B = None
        self.y: G = None
        self.v: A = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: C = None
        self.s: H = None
        self.v: D = None
        self.z: H = None
        self.p: F = None
        self.r: A = None
        self.o: D = None
        self.txt = txt

g = A("g")
i = B("i")
n = C("n")
e = D("e")
d = E("d")
l = F("l")
b = G("b")
m = H("m")
h = C("h")
j = H("j")

g.u = d
g.r = d
g.z = j
g.q = l
g.y = i
i.y = n
i.z = e
i.o = g
i.p = b
n.t = d
n.s = e
n.o = l
n.y = m
e.t = g
e.q = g
e.s = b
e.v = j
d.x = j
d.r = l
d.o = l
d.t = i
d.y = b
d.z = b
d.v = g
l.u = n
b.p = d
b.y = g
m.t = g
m.r = g
m.x = h
m.s = j
m.z = j
m.v = e
m.o = e
m.p = l
h.t = d
h.s = e
h.o = l
h.y = j
j.t = g
j.r = g
j.x = n
j.s = m
j.z = m
j.v = e
j.o = e
j.p = l
assert m.o.t.z.t.z.z.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: H = None
        self.r: E = None
        self.q: F = None
        self.y: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: D = None
        self.o: F = None
        self.y: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: G = None
        self.v: H = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: F = None
        self.o: F = None
        self.t: B = None
        self.y: G = None
        self.v: A = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: C = None
        self.s: H = None
        self.v: D = None
        self.z: H = None
        self.p: F = None
        self.r: A = None
        self.o: D = None
        self.txt = txt

g = A("g")
i = B("i")
n = C("n")
e = D("e")
d = E("d")
l = F("l")
b = G("b")
m = H("m")
h = C("h")
j = H("j")

g.u = d
g.r = d
g.z = j
g.q = l
g.y = i
i.y = n
i.z = e
i.o = g
i.p = b
n.t = d
n.s = e
n.o = l
n.y = m
e.t = g
e.q = g
e.s = b
e.v = j
d.x = j
d.r = l
d.o = l
d.t = i
d.y = b
d.z = b
d.v = g
l.u = n
b.p = d
b.y = g
m.t = g
m.r = g
m.x = h
m.s = j
m.z = j
m.v = e
m.o = e
m.p = l
h.t = d
h.s = e
h.o = l
h.y = j
j.t = g
j.r = g
j.x = n
j.s = m
j.z = m
j.v = e
j.o = e
j.p = l
assert m.o.t.z.t.z.z.txt == "m"