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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: A = None
        self.r: B = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: I = None
        self.z: B = None
        self.x: H = None
        self.y: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: D = None
        self.y: E = None
        self.x: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: J = None
        self.q: F = None
        self.txt = txt

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

h = A("h")
a = B("a")
d = C("d")
c = D("c")
g = E("g")
f = F("f")
b = G("b")
n = H("n")
i = I("i")
k = J("k")

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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: A = None
        self.r: B = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: I = None
        self.z: B = None
        self.x: H = None
        self.y: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: D = None
        self.y: E = None
        self.x: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: J = None
        self.q: F = None
        self.txt = txt

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

h = A("h")
a = B("a")
d = C("d")
c = D("c")
g = E("g")
f = F("f")
b = G("b")
n = H("n")
i = I("i")
k = J("k")

h.y = n
h.v = b
a.o = h
d.z = g
d.u = h
d.r = a
d.x = a
c.o = b
c.x = a
c.u = i
c.t = i
c.v = k
c.w = n
c.z = g
c.s = h
c.y = h
g.w = b
f.w = i
f.q = i
f.z = a
f.x = n
f.y = d
b.r = c
b.q = c
b.s = c
b.x = h
n.q = i
n.r = c
n.y = g
n.x = a
i.r = f
i.q = f
i.z = k
k.t = c
k.y = g
assert n.x.o.v.txt == "b"