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

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: I = None
        self.y: H = None
        self.v: F = None
        self.o: E = None
        self.w: G = None
        self.p: G = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: B = None
        self.z: D = None
        self.t: D = None
        self.u: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: H = None
        self.q: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: I = None
        self.y: H = None
        self.v: F = None
        self.o: E = None
        self.w: G = None
        self.p: G = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: B = None
        self.z: D = None
        self.t: D = None
        self.u: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: H = None
        self.q: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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