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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: B = None
        self.s: E = None
        self.t: D = None
        self.z: A = None
        self.txt = txt

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

l.x = i
l.q = g
l.u = b
l.z = k
j.s = g
j.x = i
d.v = g
i.x = g
i.u = g
i.o = e
i.q = b
i.y = b
i.z = b
i.v = l
g.o = l
g.u = l
g.s = b
g.y = i
g.w = i
g.x = k
g.z = j
g.p = d
k.u = g
e.p = j
e.z = k
e.t = i
e.v = l
e.w = l
b.q = d
b.x = j
b.s = g
b.t = i
b.z = l
assert k.u.p.v.txt == "
class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: E = None
        self.u: H = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: B = None
        self.s: E = None
        self.t: D = None
        self.z: A = None
        self.txt = txt

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

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