class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: I = None
        self.p: C = None
        self.w: G = 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.p: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: G = None
        self.x: F = None
        self.v: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.v: F = None
        self.z: D = None
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: C = None
        self.y: D = None
        self.s: C = None
        self.r: F = None
        self.w: G = None
        self.txt = txt

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

d.z = f
d.w = f
d.y = e
d.p = l
b.q = g
l.p = e
h.y = e
k.r = e
k.t = f
k.x = g
k.v = h
g.v = d
g.p = h
g.o = h
g.y = f
g.u = k
g.z = k
g.w = k
g.s = b
g.t = e
f.x = e
f.o = a
a.x = e
a.v = g
a.z = h
a.o = f
e.q = f
e.w = f
e.t = l
e.s = l
e.y = h
e.r = g
assert b.q.y.o.o.o.o.x.txt == "
class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: I = None
        self.p: C = None
        self.w: G = 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.p: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: G = None
        self.x: F = None
        self.v: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.v: F = None
        self.z: D = None
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: C = None
        self.y: D = None
        self.s: C = None
        self.r: F = None
        self.w: G = None
        self.txt = txt

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

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