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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: H = None
        self.q: H = None
        self.z: H = None
        self.y: H = None
        self.x: E = None
        self.v: A = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: H = None
        self.q: H = None
        self.z: H = None
        self.y: H = None
        self.x: E = None
        self.v: A = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

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

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

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