class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: B = None
        self.t: C = None
        self.s: G = None
        self.w: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: E = None
        self.u: D = None
        self.v: J = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.w: G = None
        self.q: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: G = None
        self.x: G = None
        self.p: C = None
        self.w: C = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: J = None
        self.w: C = None
        self.t: F = None
        self.z: F = None
        self.v: C = None
        self.p: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: E = None
        self.u: D = None
        self.v: J = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.w: G = None
        self.q: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: G = None
        self.x: G = None
        self.p: C = None
        self.w: C = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: J = None
        self.w: C = None
        self.t: F = None
        self.z: F = None
        self.v: C = None
        self.p: F = None
        self.txt = txt

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

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

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