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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: G = None
        self.q: A = None
        self.r: B = None
        self.x: B = None
        self.s: B = None
        self.t: I = None
        self.y: D = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: B = None
        self.q: E = None
        self.p: E = None
        self.s: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: B = None
        self.o: D = None
        self.v: D = None
        self.r: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: G = None
        self.s: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: G = None
        self.q: A = None
        self.r: B = None
        self.x: B = None
        self.s: B = None
        self.t: I = None
        self.y: D = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: B = None
        self.q: E = None
        self.p: E = None
        self.s: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: B = None
        self.o: D = None
        self.v: D = None
        self.r: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: G = None
        self.s: H = None
        self.txt = txt

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

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