class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: H = None
        self.p: B = None
        self.q: B = None
        self.s: G = None
        self.z: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: I = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: E = None
        self.o: D = None
        self.q: G = None
        self.u: E = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: I = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: I = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: E = None
        self.o: D = None
        self.q: G = None
        self.u: E = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: I = None
        self.txt = txt

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

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

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