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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: A = None
        self.r: B = None
        self.y: H = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: C = None
        self.s: D = None
        self.u: E = None
        self.q: G = None
        self.y: A = None
        self.txt = txt

k = A("k")
j = B("j")
n = C("n")
c = D("c")
l = E("l")
f = F("f")
b = G("b")
d = H("d")

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: A = None
        self.r: B = None
        self.y: H = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: C = None
        self.s: D = None
        self.u: E = None
        self.q: G = None
        self.y: A = None
        self.txt = txt

k = A("k")
j = B("j")
n = C("n")
c = D("c")
l = E("l")
f = F("f")
b = G("b")
d = H("d")

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