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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: F = None
        self.t: I = None
        self.x: H = None
        self.q: F = None
        self.v: D = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: A = None
        self.q: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: F = None
        self.t: I = None
        self.x: H = None
        self.q: F = None
        self.v: D = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: A = None
        self.q: H = None
        self.txt = txt

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

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

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