class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: D = None
        self.z: H = None
        self.t: F = None
        self.q: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: C = None
        self.s: E = None
        self.v: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: B = None
        self.u: I = None
        self.t: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: J = None
        self.o: D = None
        self.r: D = None
        self.p: B = None
        self.x: J = None
        self.w: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: D = None
        self.y: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: C = None
        self.s: E = None
        self.v: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: B = None
        self.u: I = None
        self.t: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: J = None
        self.o: D = None
        self.r: D = None
        self.p: B = None
        self.x: J = None
        self.w: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: D = None
        self.y: A = None
        self.txt = txt

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

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