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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: A = None
        self.w: H = None
        self.x: A = None
        self.r: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: C = None
        self.v: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: A = None
        self.w: H = None
        self.x: A = None
        self.r: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: C = None
        self.v: G = None
        self.txt = txt

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

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