class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: D = None
        self.s: I = None
        self.v: E = None
        self.t: I = None
        self.y: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: D = None
        self.p: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: G = None
        self.y: D = None
        self.p: G = None
        self.z: B = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: D = None
        self.p: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: G = None
        self.y: D = None
        self.p: G = None
        self.z: B = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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