class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: C = None
        self.o: J = None
        self.z: E = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: F = None
        self.t: D = None
        self.u: I = None
        self.x: J = None
        self.y: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: B = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: J = None
        self.z: C = None
        self.q: J = None
        self.o: D = None
        self.s: G = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: C = None
        self.o: J = None
        self.z: E = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: F = None
        self.t: D = None
        self.u: I = None
        self.x: J = None
        self.y: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: B = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: J = None
        self.z: C = None
        self.q: J = None
        self.o: D = None
        self.s: G = None
        self.txt = txt

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

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

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

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