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

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.o: F = None
        self.u: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: D = None
        self.u: B = None
        self.y: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: H = None
        self.q: D = None
        self.p: H = None
        self.t: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.o: F = None
        self.u: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: D = None
        self.u: B = None
        self.y: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: H = None
        self.q: D = None
        self.p: H = None
        self.t: G = None
        self.txt = txt

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

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