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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: H = None
        self.p: D = None
        self.t: F = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: A = None
        self.z: B = None
        self.s: G = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: C = None
        self.v: G = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: B = None
        self.w: A = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: B = None
        self.x: C = None
        self.w: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: H = None
        self.p: D = None
        self.t: F = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: A = None
        self.z: B = None
        self.s: G = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: C = None
        self.v: G = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: B = None
        self.w: A = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: B = None
        self.x: C = None
        self.w: C = None
        self.txt = txt

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

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