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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: G = None
        self.o: G = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: I = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: E = None
        self.q: A = None
        self.t: G = None
        self.u: D = None
        self.v: E = None
        self.y: H = None
        self.r: J = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: J = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: G = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: G = None
        self.o: G = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: I = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: E = None
        self.q: A = None
        self.t: G = None
        self.u: D = None
        self.v: E = None
        self.y: H = None
        self.r: J = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: J = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: G = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

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