class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: G = None
        self.r: C = None
        self.z: B = None
        self.u: B = None
        self.w: B = None
        self.p: F = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: D = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: A = None
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: E = None
        self.r: F = None
        self.p: F = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: D = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: A = None
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: E = None
        self.r: F = None
        self.p: F = None
        self.txt = txt

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

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