class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: B = None
        self.u: C = None
        self.p: E = None
        self.w: F = None
        self.o: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: A = None
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: H = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: C = None
        self.o: E = None
        self.q: C = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: A = None
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: H = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: C = None
        self.o: E = None
        self.q: C = None
        self.v: E = None
        self.txt = txt

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

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

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