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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: A = None
        self.q: D = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: C = None
        self.o: C = None
        self.u: C = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: A = None
        self.q: D = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: C = None
        self.o: C = None
        self.u: C = None
        self.x: F = None
        self.txt = txt

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

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

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