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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: C = None
        self.x: C = None
        self.y: G = None
        self.p: H = None
        self.w: D = None
        self.r: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: B = None
        self.z: G = None
        self.o: C = None
        self.w: G = None
        self.r: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: B = None
        self.r: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: C = None
        self.x: C = None
        self.y: G = None
        self.p: H = None
        self.w: D = None
        self.r: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: B = None
        self.z: G = None
        self.o: C = None
        self.w: G = None
        self.r: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: B = None
        self.r: B = None
        self.txt = txt

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

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

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