class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: F = None
        self.o: D = None
        self.p: B = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: A = None
        self.q: C = None
        self.u: A = None
        self.t: B = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: A = None
        self.y: H = None
        self.x: A = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: A = None
        self.q: C = None
        self.u: A = None
        self.t: B = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: A = None
        self.y: H = None
        self.x: A = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: E = None
        self.txt = txt

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

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

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

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