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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: F = None
        self.x: A = None
        self.o: E = None
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: H = None
        self.w: J = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: F = None
        self.x: A = None
        self.o: E = None
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: H = None
        self.w: J = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: B = None
        self.txt = txt

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

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

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

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