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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: D = None
        self.o: C = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: D = None
        self.o: C = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

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

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

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