class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: J = None
        self.w: D = None
        self.s: H = None
        self.t: I = None
        self.p: C = None
        self.v: B = None
        self.z: F = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: J = None
        self.y: D = None
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: I = None
        self.t: D = None
        self.v: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: B = None
        self.x: B = None
        self.y: E = None
        self.u: J = None
        self.o: C = None
        self.p: A = None
        self.q: J = None
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: J = None
        self.y: D = None
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: I = None
        self.t: D = None
        self.v: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: B = None
        self.x: B = None
        self.y: E = None
        self.u: J = None
        self.o: C = None
        self.p: A = None
        self.q: J = None
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

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

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