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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: C = None
        self.p: F = None
        self.v: J = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: C = None
        self.p: F = None
        self.v: J = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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