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

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

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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

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