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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: G = None
        self.q: G = None
        self.r: F = None
        self.t: I = None
        self.x: F = None
        self.p: G = None
        self.z: H = None
        self.u: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: G = None
        self.t: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: G = None
        self.q: G = None
        self.r: F = None
        self.t: I = None
        self.x: F = None
        self.p: G = None
        self.z: H = None
        self.u: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: G = None
        self.t: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: B = None
        self.txt = txt

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

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