class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: F = None
        self.p: F = None
        self.v: H = None
        self.s: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: A = None
        self.t: A = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: A = None
        self.t: A = None
        self.o: A = None
        self.txt = txt

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

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