class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: G = None
        self.t: C = None
        self.p: B = None
        self.v: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: B = None
        self.y: E = None
        self.s: F = None
        self.w: E = None
        self.x: G = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: C = None
        self.t: C = None
        self.w: F = None
        self.v: C = None
        self.x: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: E = None
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: E = None
        self.p: A = None
        self.s: H = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: J = None
        self.r: I = None
        self.q: D = None
        self.v: F = None
        self.p: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: D = None
        self.o: F = None
        self.u: A = None
        self.y: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: B = None
        self.y: E = None
        self.s: F = None
        self.w: E = None
        self.x: G = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: C = None
        self.t: C = None
        self.w: F = None
        self.v: C = None
        self.x: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: E = None
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: E = None
        self.p: A = None
        self.s: H = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: J = None
        self.r: I = None
        self.q: D = None
        self.v: F = None
        self.p: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: D = None
        self.o: F = None
        self.u: A = None
        self.y: B = None
        self.txt = txt

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

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

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