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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: G = None
        self.x: G = None
        self.z: C = None
        self.u: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: C = None
        self.t: C = None
        self.u: C = None
        self.p: D = None
        self.q: G = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: C = None
        self.y: C = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: G = None
        self.u: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: E = None
        self.r: B = None
        self.z: G = None
        self.s: D = None
        self.p: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: G = None
        self.x: G = None
        self.z: C = None
        self.u: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: C = None
        self.t: C = None
        self.u: C = None
        self.p: D = None
        self.q: G = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: C = None
        self.y: C = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: G = None
        self.u: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: E = None
        self.r: B = None
        self.z: G = None
        self.s: D = None
        self.p: A = None
        self.txt = txt

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

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