class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: H = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: I = None
        self.r: H = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.q: F = None
        self.r: I = None
        self.v: A = None
        self.z: H = None
        self.o: I = None
        self.p: E = None
        self.w: B = None
        self.y: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: G = None
        self.w: B = None
        self.v: F = None
        self.t: J = None
        self.q: H = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: I = None
        self.r: H = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.q: F = None
        self.r: I = None
        self.v: A = None
        self.z: H = None
        self.o: I = None
        self.p: E = None
        self.w: B = None
        self.y: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: G = None
        self.w: B = None
        self.v: F = None
        self.t: J = None
        self.q: H = None
        self.txt = txt

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

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

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