class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: G = None
        self.u: H = None
        self.w: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: G = None
        self.q: B = None
        self.txt = txt

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

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

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

f = A("f")
l = B("l")
c = C("c")
i = D("i")
a = E("a")
j = F("j")
d = G("d")
k = H("k")

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: G = None
        self.q: B = None
        self.txt = txt

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

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

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

f = A("f")
l = B("l")
c = C("c")
i = D("i")
a = E("a")
j = F("j")
d = G("d")
k = H("k")

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