class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: D = None
        self.s: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: A = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: B = None
        self.r: G = None
        self.w: I = None
        self.t: H = None
        self.p: B = None
        self.q: B = None
        self.y: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: C = None
        self.t: G = None
        self.w: C = None
        self.r: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: D = None
        self.s: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: A = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: B = None
        self.r: G = None
        self.w: I = None
        self.t: H = None
        self.p: B = None
        self.q: B = None
        self.y: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: C = None
        self.t: G = None
        self.w: C = None
        self.r: B = None
        self.txt = txt

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

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