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

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: B = None
        self.w: F = None
        self.z: B = None
        self.o: A = None
        self.v: B = None
        self.r: D = None
        self.s: F = None
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: C = None
        self.x: F = None
        self.u: I = None
        self.v: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: B = None
        self.w: F = None
        self.z: B = None
        self.o: A = None
        self.v: B = None
        self.r: D = None
        self.s: F = None
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: C = None
        self.x: F = None
        self.u: I = None
        self.v: F = None
        self.txt = txt

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

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