class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: B = None
        self.o: H = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: H = None
        self.y: A = None
        self.p: G = None
        self.q: I = None
        self.z: F = None
        self.o: G = None
        self.x: D = None
        self.r: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: D = None
        self.z: B = None
        self.t: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: G = None
        self.w: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: H = None
        self.y: A = None
        self.p: G = None
        self.q: I = None
        self.z: F = None
        self.o: G = None
        self.x: D = None
        self.r: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: D = None
        self.z: B = None
        self.t: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: G = None
        self.w: C = None
        self.txt = txt

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

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