class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: D = None
        self.s: E = None
        self.p: D = None
        self.u: F = None
        self.t: C = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: C = None
        self.txt = txt

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

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

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