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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: H = None
        self.u: B = None
        self.t: C = None
        self.v: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: A = None
        self.x: E = None
        self.y: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: E = None
        self.w: E = None
        self.v: B = None
        self.p: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: D = None
        self.s: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: H = None
        self.u: B = None
        self.t: C = None
        self.v: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: A = None
        self.x: E = None
        self.y: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: E = None
        self.w: E = None
        self.v: B = None
        self.p: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: D = None
        self.s: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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