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

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: J = None
        self.v: J = None
        self.r: B = None
        self.t: G = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: D = None
        self.s: H = None
        self.r: I = None
        self.z: C = None
        self.w: I = None
        self.t: I = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.s: B = None
        self.z: H = None
        self.v: E = None
        self.o: E = None
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: F = None
        self.o: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: J = None
        self.r: G = None
        self.y: J = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: J = None
        self.v: J = None
        self.r: B = None
        self.t: G = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: D = None
        self.s: H = None
        self.r: I = None
        self.z: C = None
        self.w: I = None
        self.t: I = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.s: B = None
        self.z: H = None
        self.v: E = None
        self.o: E = None
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: F = None
        self.o: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: J = None
        self.r: G = None
        self.y: J = None
        self.txt = txt

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

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

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