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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: G = None
        self.v: B = None
        self.z: D = None
        self.t: F = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: E = None
        self.x: A = None
        self.u: C = None
        self.p: E = None
        self.y: A = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: G = None
        self.v: B = None
        self.z: D = None
        self.t: F = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: E = None
        self.x: A = None
        self.u: C = None
        self.p: E = None
        self.y: A = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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