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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: D = None
        self.y: A = None
        self.r: G = None
        self.u: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: E = None
        self.v: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: C = None
        self.r: I = None
        self.p: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: F = None
        self.x: A = None
        self.w: G = None
        self.o: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: B = None
        self.r: F = None
        self.z: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: A = None
        self.z: I = None
        self.y: H = None
        self.u: E = None
        self.o: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: D = None
        self.y: A = None
        self.r: G = None
        self.u: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: E = None
        self.v: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: C = None
        self.r: I = None
        self.p: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: F = None
        self.x: A = None
        self.w: G = None
        self.o: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: B = None
        self.r: F = None
        self.z: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: A = None
        self.z: I = None
        self.y: H = None
        self.u: E = None
        self.o: G = None
        self.txt = txt

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

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