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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: H = None
        self.p: F = None
        self.w: G = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: H = None
        self.p: F = None
        self.w: G = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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