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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: F = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: G = None
        self.t: E = None
        self.w: A = None
        self.v: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: D = None
        self.p: E = None
        self.r: H = None
        self.x: E = None
        self.z: D = None
        self.v: B = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: F = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: G = None
        self.t: E = None
        self.w: A = None
        self.v: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: D = None
        self.p: E = None
        self.r: H = None
        self.x: E = None
        self.z: D = None
        self.v: B = None
        self.txt = txt

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

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

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

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

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