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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: I = None
        self.p: F = None
        self.z: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: C = None
        self.r: C = None
        self.t: B = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: B = None
        self.w: A = None
        self.x: A = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: B = None
        self.r: D = None
        self.p: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: I = None
        self.p: F = None
        self.z: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: C = None
        self.r: C = None
        self.t: B = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: B = None
        self.w: A = None
        self.x: A = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: B = None
        self.r: D = None
        self.p: C = None
        self.txt = txt

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

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

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