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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: I = None
        self.v: H = None
        self.q: C = None
        self.y: F = None
        self.z: G = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: F = None
        self.r: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: C = None
        self.z: G = None
        self.q: C = None
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: C = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: F = None
        self.s: I = None
        self.w: F = None
        self.p: B = None
        self.r: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: F = None
        self.v: C = None
        self.y: E = None
        self.u: H = None
        self.t: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: I = None
        self.v: H = None
        self.q: C = None
        self.y: F = None
        self.z: G = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: F = None
        self.r: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: C = None
        self.z: G = None
        self.q: C = None
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: C = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: F = None
        self.s: I = None
        self.w: F = None
        self.p: B = None
        self.r: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: F = None
        self.v: C = None
        self.y: E = None
        self.u: H = None
        self.t: G = None
        self.txt = txt

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

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