class A:
    def __init__(self, txt: str):
        self.q: J = None
        self.w: I = None
        self.o: B = None
        self.r: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: G = None
        self.y: D = None
        self.x: F = None
        self.s: H = None
        self.u: G = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: I = None
        self.s: A = None
        self.q: B = None
        self.p: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: G = None
        self.y: D = None
        self.x: F = None
        self.s: H = None
        self.u: G = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: I = None
        self.s: A = None
        self.q: B = None
        self.p: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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