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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: F = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: G = None
        self.p: G = None
        self.y: C = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: E = None
        self.q: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: F = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: G = None
        self.p: G = None
        self.y: C = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: E = None
        self.q: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: B = None
        self.txt = txt

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

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

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