class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: A = None
        self.z: E = None
        self.w: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: C = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: H = None
        self.p: B = None
        self.s: H = None
        self.q: H = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.s: F = None
        self.t: G = None
        self.q: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: A = None
        self.p: A = None
        self.q: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: A = None
        self.z: E = None
        self.w: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: C = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: H = None
        self.p: B = None
        self.s: H = None
        self.q: H = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.s: F = None
        self.t: G = None
        self.q: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: A = None
        self.p: A = None
        self.q: D = None
        self.txt = txt

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

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