class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: D = None
        self.r: C = None
        self.z: H = None
        self.o: D = None
        self.t: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: F = None
        self.y: E = None
        self.s: C = None
        self.u: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: A = None
        self.z: A = None
        self.r: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: D = None
        self.r: C = None
        self.z: H = None
        self.o: D = None
        self.t: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: F = None
        self.y: E = None
        self.s: C = None
        self.u: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: A = None
        self.z: A = None
        self.r: A = None
        self.txt = txt

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

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