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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: C = None
        self.r: H = None
        self.x: G = None
        self.t: G = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: D = None
        self.o: H = None
        self.p: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: E = None
        self.o: C = None
        self.y: E = None
        self.r: E = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: A = None
        self.o: H = None
        self.w: E = None
        self.t: D = None
        self.s: H = None
        self.r: A = None
        self.x: F = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: A = None
        self.u: I = None
        self.y: A = None
        self.p: G = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: B = None
        self.o: H = None
        self.u: C = None
        self.x: H = None
        self.t: E = None
        self.z: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: C = None
        self.r: H = None
        self.x: G = None
        self.t: G = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: D = None
        self.o: H = None
        self.p: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: E = None
        self.o: C = None
        self.y: E = None
        self.r: E = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: A = None
        self.o: H = None
        self.w: E = None
        self.t: D = None
        self.s: H = None
        self.r: A = None
        self.x: F = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: A = None
        self.u: I = None
        self.y: A = None
        self.p: G = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: B = None
        self.o: H = None
        self.u: C = None
        self.x: H = None
        self.t: E = None
        self.z: D = None
        self.txt = txt

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

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