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

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

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: A = None
        self.r: A = None
        self.t: F = None
        self.p: F = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: F = None
        self.v: I = None
        self.q: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: F = None
        self.x: F = None
        self.z: D = None
        self.s: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: A = None
        self.r: A = None
        self.t: F = None
        self.p: F = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: F = None
        self.v: I = None
        self.q: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: F = None
        self.x: F = None
        self.z: D = None
        self.s: B = None
        self.txt = txt

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

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