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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: G = None
        self.t: D = None
        self.x: B = None
        self.p: D = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: G = None
        self.t: D = None
        self.x: B = None
        self.p: D = None
        self.y: B = None
        self.txt = txt

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

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