class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: I = None
        self.o: E = None
        self.u: A = None
        self.y: I = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: C = None
        self.v: J = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: A = None
        self.y: G = None
        self.t: A = None
        self.r: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: G = None
        self.y: A = None
        self.t: D = None
        self.s: C = None
        self.o: H = None
        self.q: G = None
        self.r: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: I = None
        self.o: E = None
        self.u: A = None
        self.y: I = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: C = None
        self.v: J = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: A = None
        self.y: G = None
        self.t: A = None
        self.r: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: G = None
        self.y: A = None
        self.t: D = None
        self.s: C = None
        self.o: H = None
        self.q: G = None
        self.r: A = None
        self.txt = txt

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

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

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