class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: I = None
        self.r: H = None
        self.z: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: E = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: G = None
        self.r: I = None
        self.q: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: H = None
        self.x: E = None
        self.p: A = None
        self.s: H = None
        self.z: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: G = None
        self.v: F = None
        self.r: F = None
        self.p: D = None
        self.u: C = None
        self.o: D = None
        self.x: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: E = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: G = None
        self.r: I = None
        self.q: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: H = None
        self.x: E = None
        self.p: A = None
        self.s: H = None
        self.z: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: G = None
        self.v: F = None
        self.r: F = None
        self.p: D = None
        self.u: C = None
        self.o: D = None
        self.x: D = None
        self.txt = txt

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

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