class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.o: D = None
        self.y: I = None
        self.u: D = None
        self.s: J = None
        self.r: J = None
        self.t: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: J = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: C = None
        self.s: C = None
        self.y: F = None
        self.r: D = None
        self.p: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: J = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: C = None
        self.s: C = None
        self.y: F = None
        self.r: D = None
        self.p: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: E = None
        self.txt = txt

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

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