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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: A = None
        self.v: I = None
        self.t: A = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: H = None
        self.z: J = None
        self.p: H = None
        self.u: H = None
        self.q: H = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.x: C = None
        self.u: J = None
        self.p: C = None
        self.q: J = None
        self.r: I = None
        self.o: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: A = None
        self.w: E = None
        self.x: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: E = None
        self.s: D = None
        self.w: D = None
        self.t: G = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: A = None
        self.v: I = None
        self.t: A = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: H = None
        self.z: J = None
        self.p: H = None
        self.u: H = None
        self.q: H = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.x: C = None
        self.u: J = None
        self.p: C = None
        self.q: J = None
        self.r: I = None
        self.o: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: A = None
        self.w: E = None
        self.x: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: E = None
        self.s: D = None
        self.w: D = None
        self.t: G = None
        self.txt = txt

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

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