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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: B = None
        self.x: A = None
        self.o: C = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: B = None
        self.x: A = None
        self.o: C = None
        self.v: F = None
        self.txt = txt

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

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