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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: D = None
        self.y: E = None
        self.o: F = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: A = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: D = None
        self.y: E = None
        self.o: F = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: A = None
        self.w: D = None
        self.txt = txt

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

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

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