class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: G = None
        self.t: E = None
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: I = None
        self.w: A = None
        self.o: C = None
        self.v: D = None
        self.p: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: B = None
        self.t: G = None
        self.z: B = None
        self.x: C = None
        self.u: G = None
        self.y: H = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.z: F = None
        self.w: A = None
        self.t: B = None
        self.r: C = None
        self.q: G = None
        self.s: G = None
        self.p: D = None
        self.v: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: I = None
        self.w: A = None
        self.o: C = None
        self.v: D = None
        self.p: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: B = None
        self.t: G = None
        self.z: B = None
        self.x: C = None
        self.u: G = None
        self.y: H = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.z: F = None
        self.w: A = None
        self.t: B = None
        self.r: C = None
        self.q: G = None
        self.s: G = None
        self.p: D = None
        self.v: D = None
        self.txt = txt

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

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

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

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