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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: D = None
        self.z: A = None
        self.w: J = None
        self.u: G = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: I = None
        self.p: I = None
        self.s: J = None
        self.z: A = None
        self.y: C = None
        self.x: J = None
        self.v: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.r: I = None
        self.o: C = None
        self.z: B = None
        self.y: E = None
        self.s: I = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.x: F = None
        self.q: H = None
        self.y: H = None
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: F = None
        self.x: F = None
        self.u: F = None
        self.r: B = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.t: A = None
        self.y: E = None
        self.q: F = None
        self.r: G = None
        self.z: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: H = None
        self.u: I = None
        self.y: G = None
        self.v: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: D = None
        self.z: A = None
        self.w: J = None
        self.u: G = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: I = None
        self.p: I = None
        self.s: J = None
        self.z: A = None
        self.y: C = None
        self.x: J = None
        self.v: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.r: I = None
        self.o: C = None
        self.z: B = None
        self.y: E = None
        self.s: I = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.x: F = None
        self.q: H = None
        self.y: H = None
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: F = None
        self.x: F = None
        self.u: F = None
        self.r: B = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.t: A = None
        self.y: E = None
        self.q: F = None
        self.r: G = None
        self.z: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: H = None
        self.u: I = None
        self.y: G = None
        self.v: I = None
        self.txt = txt

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

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