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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: A = None
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: E = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: D = None
        self.y: D = None
        self.o: H = None
        self.r: D = None
        self.w: G = None
        self.u: B = None
        self.s: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: B = None
        self.x: G = None
        self.r: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: A = None
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: E = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: D = None
        self.y: D = None
        self.o: H = None
        self.r: D = None
        self.w: G = None
        self.u: B = None
        self.s: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: B = None
        self.x: G = None
        self.r: A = None
        self.txt = txt

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

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