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

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

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: H = None
        self.z: J = None
        self.u: H = None
        self.y: I = None
        self.t: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: C = None
        self.x: A = None
        self.p: G = None
        self.t: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: H = None
        self.z: J = None
        self.u: H = None
        self.y: I = None
        self.t: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: C = None
        self.x: A = None
        self.p: G = None
        self.t: G = None
        self.txt = txt

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

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