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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: F = None
        self.y: F = None
        self.u: H = None
        self.x: H = None
        self.r: G = None
        self.t: B = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: F = None
        self.p: H = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: B = None
        self.o: D = None
        self.x: H = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: A = None
        self.t: E = None
        self.q: E = None
        self.w: D = None
        self.p: A = None
        self.u: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: F = None
        self.y: F = None
        self.u: H = None
        self.x: H = None
        self.r: G = None
        self.t: B = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: F = None
        self.p: H = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: B = None
        self.o: D = None
        self.x: H = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: A = None
        self.t: E = None
        self.q: E = None
        self.w: D = None
        self.p: A = None
        self.u: F = None
        self.txt = txt

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

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