class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: B = None
        self.q: G = None
        self.o: C = None
        self.p: C = None
        self.v: C = None
        self.s: G = None
        self.w: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: F = None
        self.z: E = None
        self.y: A = None
        self.t: D = None
        self.u: D = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: B = None
        self.q: G = None
        self.z: A = None
        self.o: A = None
        self.x: G = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: C = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: A = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: A = None
        self.r: E = None
        self.v: C = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: C = None
        self.x: D = None
        self.q: E = None
        self.u: G = None
        self.w: C = None
        self.txt = txt

i = A("i")
m = B("m")
c = C("c")
b = D("b")
a = E("a")
f = F("f")
n = G("n")
e = H("e")
g = B("g")
h = D("h")

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: F = None
        self.z: E = None
        self.y: A = None
        self.t: D = None
        self.u: D = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: B = None
        self.q: G = None
        self.z: A = None
        self.o: A = None
        self.x: G = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: C = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: A = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: A = None
        self.r: E = None
        self.v: C = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: C = None
        self.x: D = None
        self.q: E = None
        self.u: G = None
        self.w: C = None
        self.txt = txt

i = A("i")
m = B("m")
c = C("c")
b = D("b")
a = E("a")
f = F("f")
n = G("n")
e = H("e")
g = B("g")
h = D("h")

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