class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: B = None
        self.o: B = None
        self.u: B = None
        self.r: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: I = None
        self.o: H = None
        self.p: D = None
        self.r: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: I = None
        self.t: C = None
        self.q: A = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: C = None
        self.p: E = None
        self.x: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: E = None
        self.r: D = None
        self.o: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: I = None
        self.o: H = None
        self.p: D = None
        self.r: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: I = None
        self.t: C = None
        self.q: A = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: C = None
        self.p: E = None
        self.x: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: E = None
        self.r: D = None
        self.o: H = None
        self.txt = txt

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

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