class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: H = None
        self.t: B = None
        self.w: B = None
        self.s: E = None
        self.x: B = None
        self.u: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: A = None
        self.o: B = None
        self.v: I = None
        self.u: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: A = None
        self.o: B = None
        self.v: I = None
        self.u: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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