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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: H = None
        self.s: G = None
        self.w: F = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: B = None
        self.z: A = None
        self.t: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: D = None
        self.t: A = None
        self.v: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: D = None
        self.r: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: H = None
        self.s: G = None
        self.w: F = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: B = None
        self.z: A = None
        self.t: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: D = None
        self.t: A = None
        self.v: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: D = None
        self.r: B = None
        self.txt = txt

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

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