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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: C = None
        self.y: G = None
        self.v: A = None
        self.u: C = None
        self.p: C = None
        self.z: E = None
        self.r: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: C = None
        self.y: G = None
        self.v: A = None
        self.u: C = None
        self.p: C = None
        self.z: E = None
        self.r: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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

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

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

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