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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: H = None
        self.w: E = None
        self.q: H = None
        self.z: H = None
        self.r: E = None
        self.t: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: C = None
        self.s: H = None
        self.o: A = None
        self.u: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: C = None
        self.u: D = None
        self.t: E = None
        self.o: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: H = None
        self.w: E = None
        self.q: H = None
        self.z: H = None
        self.r: E = None
        self.t: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: C = None
        self.s: H = None
        self.o: A = None
        self.u: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: C = None
        self.u: D = None
        self.t: E = None
        self.o: F = None
        self.txt = txt

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

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