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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: C = None
        self.q: B = None
        self.w: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: E = None
        self.y: B = None
        self.t: C = None
        self.s: F = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: C = None
        self.q: B = None
        self.w: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: E = None
        self.y: B = None
        self.t: C = None
        self.s: F = None
        self.txt = txt

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

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

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