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

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

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

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: C = None
        self.y: B = None
        self.x: B = None
        self.s: F = None
        self.t: F = None
        self.p: B = None
        self.r: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: A = None
        self.p: E = None
        self.t: C = None
        self.v: B = None
        self.o: B = None
        self.z: D = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: C = None
        self.y: B = None
        self.x: B = None
        self.s: F = None
        self.t: F = None
        self.p: B = None
        self.r: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: A = None
        self.p: E = None
        self.t: C = None
        self.v: B = None
        self.o: B = None
        self.z: D = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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