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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: G = None
        self.y: A = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: C = None
        self.t: D = None
        self.y: H = None
        self.s: H = None
        self.o: F = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: A = None
        self.o: D = None
        self.u: H = None
        self.w: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: A = None
        self.o: G = None
        self.s: A = None
        self.p: G = None
        self.q: G = None
        self.w: H = None
        self.u: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: G = None
        self.y: A = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: C = None
        self.t: D = None
        self.y: H = None
        self.s: H = None
        self.o: F = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: A = None
        self.o: D = None
        self.u: H = None
        self.w: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: A = None
        self.o: G = None
        self.s: A = None
        self.p: G = None
        self.q: G = None
        self.w: H = None
        self.u: C = None
        self.txt = txt

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

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