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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: C = None
        self.q: B = None
        self.y: B = None
        self.u: D = None
        self.z: C = None
        self.x: G = None
        self.p: C = None
        self.t: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: E = None
        self.x: B = None
        self.t: A = None
        self.v: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: G = None
        self.q: E = None
        self.y: C = None
        self.u: G = None
        self.r: H = None
        self.z: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: C = None
        self.q: B = None
        self.y: B = None
        self.u: D = None
        self.z: C = None
        self.x: G = None
        self.p: C = None
        self.t: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: E = None
        self.x: B = None
        self.t: A = None
        self.v: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: G = None
        self.q: E = None
        self.y: C = None
        self.u: G = None
        self.r: H = None
        self.z: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

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