class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: C = None
        self.v: C = None
        self.x: G = None
        self.w: F = None
        self.y: D = None
        self.o: E = None
        self.t: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: B = None
        self.o: D = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: H = None
        self.u: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: B = None
        self.s: D = None
        self.txt = txt

d = A("d")
b = B("b")
f = C("f")
n = D("n")
a = E("a")
h = F("h")
c = G("c")
k = H("k")
i = B("i")
m = E("m")

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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: B = None
        self.o: D = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: H = None
        self.u: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: B = None
        self.s: D = None
        self.txt = txt

d = A("d")
b = B("b")
f = C("f")
n = D("n")
a = E("a")
h = F("h")
c = G("c")
k = H("k")
i = B("i")
m = E("m")

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