class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: E = None
        self.p: G = None
        self.q: A = None
        self.t: G = None
        self.z: C = None
        self.y: G = None
        self.u: A = None
        self.txt = txt

k = A("k")
h = B("h")
g = C("g")
a = D("a")
l = E("l")
j = F("j")
d = G("d")
c = H("c")
b = F("b")
e = D("e")

k.s = d
h.x = a
h.v = k
h.r = j
h.u = d
g.v = h
a.p = g
l.q = d
l.x = c
l.z = c
l.v = e
l.w = g
l.p = g
j.w = a
j.y = d
j.s = d
j.v = e
d.y = g
c.x = h
c.o = l
c.p = d
c.t = d
c.y = d
c.q = k
c.u = k
c.z = g
b.w = a
b.v = a
b.y = d
b.s = d
e.p = g
assert b.v.p.v.u.y.v.v.s.txt == "
class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: E = None
        self.p: G = None
        self.q: A = None
        self.t: G = None
        self.z: C = None
        self.y: G = None
        self.u: A = None
        self.txt = txt

k = A("k")
h = B("h")
g = C("g")
a = D("a")
l = E("l")
j = F("j")
d = G("d")
c = H("c")
b = F("b")
e = D("e")

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