class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: E = None
        self.r: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: F = None
        self.p: F = None
        self.x: F = None
        self.u: H = None
        self.q: F = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: A = None
        self.u: A = None
        self.v: G = None
        self.z: G = None
        self.p: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.p: I = None
        self.r: G = None
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: G = None
        self.y: I = None
        self.w: I = None
        self.x: G = None
        self.q: C = None
        self.v: E = None
        self.t: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: F = None
        self.u: H = None
        self.q: B = None
        self.p: A = None
        self.r: J = None
        self.s: A = None
        self.z: F = None
        self.o: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: J = None
        self.u: D = None
        self.o: B = None
        self.y: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: E = None
        self.t: I = None
        self.u: B = None
        self.v: E = None
        self.w: D = None
        self.x: A = None
        self.q: E = None
        self.y: A = None
        self.txt = txt

e = A("e")
h = B("h")
n = C("n")
d = D("d")
m = E("m")
g = F("g")
j = G("j")
b = H("b")
k = I("k")
l = J("l")

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: F = None
        self.p: F = None
        self.x: F = None
        self.u: H = None
        self.q: F = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: A = None
        self.u: A = None
        self.v: G = None
        self.z: G = None
        self.p: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.p: I = None
        self.r: G = None
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: G = None
        self.y: I = None
        self.w: I = None
        self.x: G = None
        self.q: C = None
        self.v: E = None
        self.t: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: F = None
        self.u: H = None
        self.q: B = None
        self.p: A = None
        self.r: J = None
        self.s: A = None
        self.z: F = None
        self.o: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: J = None
        self.u: D = None
        self.o: B = None
        self.y: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: E = None
        self.t: I = None
        self.u: B = None
        self.v: E = None
        self.w: D = None
        self.x: A = None
        self.q: E = None
        self.y: A = None
        self.txt = txt

e = A("e")
h = B("h")
n = C("n")
d = D("d")
m = E("m")
g = F("g")
j = G("j")
b = H("b")
k = I("k")
l = J("l")

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