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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: I = None
        self.s: H = None
        self.t: B = None
        self.w: B = None
        self.r: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: I = None
        self.u: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: G = None
        self.o: G = None
        self.y: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: E = None
        self.z: G = None
        self.t: E = None
        self.p: J = None
        self.s: J = None
        self.x: F = None
        self.r: I = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: I = None
        self.s: H = None
        self.t: B = None
        self.w: B = None
        self.r: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: I = None
        self.u: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: G = None
        self.o: G = None
        self.y: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: E = None
        self.z: G = None
        self.t: E = None
        self.p: J = None
        self.s: J = None
        self.x: F = None
        self.r: I = None
        self.txt = txt

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

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

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

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