class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: C = None
        self.o: F = None
        self.s: G = None
        self.q: G = None
        self.p: I = None
        self.r: C = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: F = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: J = None
        self.t: J = None
        self.r: I = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: H = None
        self.r: J = None
        self.x: H = None
        self.p: C = None
        self.w: G = None
        self.u: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: C = None
        self.o: F = None
        self.s: G = None
        self.q: G = None
        self.p: I = None
        self.r: C = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: F = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: J = None
        self.t: J = None
        self.r: I = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: H = None
        self.r: J = None
        self.x: H = None
        self.p: C = None
        self.w: G = None
        self.u: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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

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

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

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