class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: I = None
        self.x: F = None
        self.u: E = None
        self.r: E = None
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: D = None
        self.u: I = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: B = None
        self.v: E = None
        self.y: C = None
        self.q: G = None
        self.s: F = None
        self.u: C = None
        self.w: E = None
        self.r: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: D = None
        self.u: I = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: B = None
        self.v: E = None
        self.y: C = None
        self.q: G = None
        self.s: F = None
        self.u: C = None
        self.w: E = None
        self.r: B = None
        self.txt = txt

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

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