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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: F = None
        self.r: E = None
        self.z: D = None
        self.w: D = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: E = None
        self.s: F = None
        self.o: B = None
        self.w: D = None
        self.p: H = None
        self.z: E = None
        self.q: H = None
        self.txt = txt

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

g = A("g")
l = B("l")
a = C("a")
j = D("j")
n = E("n")
b = F("b")
h = G("h")
f = H("f")
k = A("k")

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: F = None
        self.r: E = None
        self.z: D = None
        self.w: D = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: E = None
        self.s: F = None
        self.o: B = None
        self.w: D = None
        self.p: H = None
        self.z: E = None
        self.q: H = None
        self.txt = txt

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

g = A("g")
l = B("l")
a = C("a")
j = D("j")
n = E("n")
b = F("b")
h = G("h")
f = H("f")
k = A("k")

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