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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: G = None
        self.y: D = None
        self.r: I = None
        self.z: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: I = None
        self.t: G = None
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: G = None
        self.y: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: E = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: E = None
        self.o: D = None
        self.z: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: E = None
        self.t: D = None
        self.q: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: G = None
        self.y: D = None
        self.r: I = None
        self.z: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: I = None
        self.t: G = None
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: G = None
        self.y: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: E = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: E = None
        self.o: D = None
        self.z: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: E = None
        self.t: D = None
        self.q: D = None
        self.txt = txt

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

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