class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: H = None
        self.q: E = None
        self.y: I = None
        self.x: G = None
        self.v: C = None
        self.u: E = None
        self.p: I = None
        self.s: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: H = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.w: E = None
        self.r: I = None
        self.t: C = None
        self.s: H = None
        self.z: A = None
        self.u: A = None
        self.v: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: B = None
        self.o: H = None
        self.s: F = None
        self.q: I = None
        self.u: A = None
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: E = None
        self.p: B = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: I = None
        self.w: E = None
        self.q: C = None
        self.txt = txt

g = A("g")
f = B("f")
l = C("l")
m = D("m")
j = E("j")
i = F("i")
c = G("c")
n = H("n")
a = I("a")
e = I("e")

g.z = i
g.r = n
g.q = j
g.u = j
g.y = e
g.p = e
g.x = c
g.v = l
g.s = l
f.t = e
f.q = e
l.o = c
l.t = c
l.w = n
m.o = e
m.w = j
m.r = a
m.t = l
m.s = n
m.v = n
m.z = g
m.u = g
j.z = f
j.u = g
j.s = g
j.x = l
i.v = f
c.x = m
c.z = m
c.r = f
c.o = n
c.s = i
c.q = e
c.u = g
n.r = g
n.z = j
n.p = f
n.w = c
a.x = i
a.t = e
a.w = j
a.q = l
e.x = i
e.t = a
e.w = j
e.q = l
assert l.w.p.q.txt == "
class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: H = None
        self.q: E = None
        self.y: I = None
        self.x: G = None
        self.v: C = None
        self.u: E = None
        self.p: I = None
        self.s: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: H = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.w: E = None
        self.r: I = None
        self.t: C = None
        self.s: H = None
        self.z: A = None
        self.u: A = None
        self.v: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: B = None
        self.o: H = None
        self.s: F = None
        self.q: I = None
        self.u: A = None
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: E = None
        self.p: B = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: I = None
        self.w: E = None
        self.q: C = None
        self.txt = txt

g = A("g")
f = B("f")
l = C("l")
m = D("m")
j = E("j")
i = F("i")
c = G("c")
n = H("n")
a = I("a")
e = I("e")

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