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

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

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: H = None
        self.q: F = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: H = None
        self.p: J = None
        self.o: H = None
        self.s: H = None
        self.u: H = None
        self.z: I = None
        self.w: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: H = None
        self.q: F = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: H = None
        self.p: J = None
        self.o: H = None
        self.s: H = None
        self.u: H = None
        self.z: I = None
        self.w: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: D = None
        self.txt = txt

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

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

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