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

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: E = None
        self.u: C = None
        self.o: G = None
        self.v: A = None
        self.w: G = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: B = None
        self.s: A = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: C = None
        self.p: A = None
        self.y: H = None
        self.q: E = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: B = None
        self.w: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: E = None
        self.u: C = None
        self.o: G = None
        self.v: A = None
        self.w: G = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: B = None
        self.s: A = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: C = None
        self.p: A = None
        self.y: H = None
        self.q: E = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: B = None
        self.w: C = None
        self.txt = txt

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

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