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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: C = None
        self.x: C = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: H = None
        self.z: E = None
        self.x: F = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: C = None
        self.z: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: D = None
        self.q: F = None
        self.p: A = None
        self.x: H = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: E = None
        self.t: G = None
        self.s: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: C = None
        self.x: C = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: H = None
        self.z: E = None
        self.x: F = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: C = None
        self.z: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: D = None
        self.q: F = None
        self.p: A = None
        self.x: H = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: E = None
        self.t: G = None
        self.s: D = None
        self.txt = txt

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

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