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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: C = None
        self.x: E = None
        self.s: E = None
        self.p: E = None
        self.u: G = None
        self.w: H = None
        self.y: G = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: I = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: F = None
        self.p: C = None
        self.y: C = None
        self.o: E = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: H = None
        self.z: H = None
        self.u: A = None
        self.q: H = None
        self.txt = txt

n = A("n")
i = B("i")
j = C("j")
e = D("e")
m = E("m")
c = F("c")
d = G("d")
a = H("a")
f = I("f")

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: C = None
        self.x: E = None
        self.s: E = None
        self.p: E = None
        self.u: G = None
        self.w: H = None
        self.y: G = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: I = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: F = None
        self.p: C = None
        self.y: C = None
        self.o: E = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: H = None
        self.z: H = None
        self.u: A = None
        self.q: H = None
        self.txt = txt

n = A("n")
i = B("i")
j = C("j")
e = D("e")
m = E("m")
c = F("c")
d = G("d")
a = H("a")
f = I("f")

n.x = e
n.y = e
n.t = e
n.p = c
n.w = j
n.r = j
n.v = f
n.s = d
n.o = i
i.r = d
i.u = d
i.y = d
i.q = d
i.z = j
i.x = m
i.s = m
i.p = m
i.w = a
j.u = m
j.r = m
j.v = f
e.u = i
e.x = c
e.p = j
e.y = j
e.o = m
m.y = e
m.x = a
m.w = j
m.t = i
m.q = f
c.v = e
c.z = e
c.t = d
c.x = i
c.u = f
c.q = j
d.z = n
a.u = d
a.v = d
a.s = n
a.y = c
a.o = j
a.z = j
f.w = n
f.u = n
f.y = a
f.z = a
f.q = a
assert c.q.v.u.t.txt == "e"