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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: C = None
        self.y: F = None
        self.p: A = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: H = None
        self.t: G = None
        self.o: G = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: H = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: A = None
        self.t: A = None
        self.p: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: B = None
        self.o: E = None
        self.s: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: C = None
        self.y: F = None
        self.p: A = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: H = None
        self.t: G = None
        self.o: G = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: H = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: A = None
        self.t: A = None
        self.p: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: B = None
        self.o: E = None
        self.s: A = None
        self.txt = txt

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

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