class A:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: I = None
        self.o: E = None
        self.t: H = None
        self.s: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: H = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: C = None
        self.z: G = None
        self.o: C = None
        self.x: C = None
        self.w: H = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: D = None
        self.x: F = None
        self.q: E = None
        self.u: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: H = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: C = None
        self.z: G = None
        self.o: C = None
        self.x: C = None
        self.w: H = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: D = None
        self.x: F = None
        self.q: E = None
        self.u: D = None
        self.txt = txt

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

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

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