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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: B = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: E = None
        self.t: B = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: B = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: E = None
        self.t: B = None
        self.txt = txt

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

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

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

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

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

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

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