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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: H = None
        self.z: H = None
        self.u: C = None
        self.p: E = None
        self.q: F = None
        self.x: F = None
        self.o: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: B = None
        self.u: H = None
        self.y: E = None
        self.s: G = None
        self.v: G = None
        self.q: D = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: H = None
        self.s: C = None
        self.o: A = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: F = None
        self.v: C = None
        self.y: A = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: E = None
        self.p: D = None
        self.t: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: H = None
        self.z: H = None
        self.u: C = None
        self.p: E = None
        self.q: F = None
        self.x: F = None
        self.o: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: B = None
        self.u: H = None
        self.y: E = None
        self.s: G = None
        self.v: G = None
        self.q: D = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: H = None
        self.s: C = None
        self.o: A = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: F = None
        self.v: C = None
        self.y: A = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: E = None
        self.p: D = None
        self.t: D = None
        self.txt = txt

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

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