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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: D = None
        self.t: B = None
        self.z: E = None
        self.x: B = None
        self.r: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: C = None
        self.y: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: I = None
        self.p: E = None
        self.x: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: D = None
        self.t: B = None
        self.z: E = None
        self.x: B = None
        self.r: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: C = None
        self.y: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: I = None
        self.p: E = None
        self.x: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

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