class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: G = None
        self.t: D = None
        self.z: F = None
        self.x: I = None
        self.w: H = None
        self.r: H = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: C = None
        self.y: E = None
        self.q: D = None
        self.r: G = None
        self.p: A = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: G = None
        self.w: E = None
        self.t: A = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: F = None
        self.u: D = None
        self.z: J = None
        self.t: A = None
        self.y: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: E = None
        self.q: A = None
        self.p: J = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: E = None
        self.v: F = None
        self.u: F = None
        self.q: H = None
        self.w: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: C = None
        self.y: E = None
        self.q: D = None
        self.r: G = None
        self.p: A = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: G = None
        self.w: E = None
        self.t: A = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: F = None
        self.u: D = None
        self.z: J = None
        self.t: A = None
        self.y: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: E = None
        self.q: A = None
        self.p: J = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: E = None
        self.v: F = None
        self.u: F = None
        self.q: H = None
        self.w: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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