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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: E = None
        self.z: A = None
        self.v: G = None
        self.u: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: E = None
        self.z: A = None
        self.v: G = None
        self.u: G = None
        self.txt = txt

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

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