class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: C = None
        self.o: G = None
        self.z: D = None
        self.v: B = None
        self.s: I = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: C = None
        self.s: E = None
        self.z: I = None
        self.x: I = None
        self.w: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: H = None
        self.q: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: F = None
        self.q: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: C = None
        self.s: E = None
        self.z: I = None
        self.x: I = None
        self.w: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: H = None
        self.q: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: F = None
        self.q: A = None
        self.txt = txt

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

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

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