class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: B = None
        self.x: F = None
        self.w: G = None
        self.v: F = None
        self.z: F = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: E = None
        self.t: G = None
        self.o: C = None
        self.s: A = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: H = None
        self.t: I = None
        self.y: I = None
        self.r: A = None
        self.v: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: E = None
        self.t: G = None
        self.o: C = None
        self.s: A = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: H = None
        self.t: I = None
        self.y: I = None
        self.r: A = None
        self.v: A = None
        self.txt = txt

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

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

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

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