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

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

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: E = None
        self.q: A = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: J = None
        self.q: J = None
        self.y: C = None
        self.u: A = None
        self.x: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: C = None
        self.o: C = None
        self.w: J = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: E = None
        self.q: A = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: J = None
        self.q: J = None
        self.y: C = None
        self.u: A = None
        self.x: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: C = None
        self.o: C = None
        self.w: J = None
        self.z: D = None
        self.txt = txt

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

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

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