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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: H = None
        self.y: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: H = None
        self.x: D = None
        self.o: G = None
        self.z: B = None
        self.v: C = None
        self.t: G = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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

g.r = m
g.z = m
g.s = m
g.p = j
g.u = j
g.v = a
g.o = n
g.y = e
g.t = h
m.t = j
m.r = i
m.y = e
j.t = a
j.p = h
j.y = g
j.w = g
j.z = g
j.q = e
j.o = i
j.r = m
h.s = n
b.u = h
b.x = h
b.w = i
b.o = a
b.t = a
b.z = m
b.r = m
b.v = j
n.y = j
n.s = g
n.t = m
a.t = i
a.v = i
a.r = m
a.y = n
a.q = g
a.p = g
a.s = g
i.w = e
i.y = h
i.z = j
i.q = m
i.s = g
i.x = b
e.r = n
e.z = b
e.q = h
assert m.y.r.y.t.txt == "
class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: C = None
        self.u: C = None
        self.z: B = None
        self.v: G = None
        self.o: F = None
        self.s: B = None
        self.y: I = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: H = None
        self.y: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: H = None
        self.x: D = None
        self.o: G = None
        self.z: B = None
        self.v: C = None
        self.t: G = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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

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