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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: F = None
        self.q: E = None
        self.t: I = None
        self.p: D = None
        self.r: I = None
        self.w: I = None
        self.y: C = None
        self.v: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: E = None
        self.q: C = None
        self.t: A = None
        self.x: G = None
        self.z: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: G = None
        self.w: C = None
        self.z: B = None
        self.y: G = None
        self.x: I = None
        self.p: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: F = None
        self.q: E = None
        self.t: I = None
        self.p: D = None
        self.r: I = None
        self.w: I = None
        self.y: C = None
        self.v: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: E = None
        self.q: C = None
        self.t: A = None
        self.x: G = None
        self.z: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: G = None
        self.w: C = None
        self.z: B = None
        self.y: G = None
        self.x: I = None
        self.p: D = None
        self.txt = txt

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

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

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