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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: A = None
        self.r: F = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: E = None
        self.p: I = None
        self.t: G = None
        self.w: E = None
        self.v: E = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: H = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: A = None
        self.y: B = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: H = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: E = None
        self.x: B = None
        self.t: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: B = None
        self.r: C = None
        self.x: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: A = None
        self.r: F = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: E = None
        self.p: I = None
        self.t: G = None
        self.w: E = None
        self.v: E = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: H = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: A = None
        self.y: B = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: H = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: E = None
        self.x: B = None
        self.t: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: B = None
        self.r: C = None
        self.x: C = None
        self.txt = txt

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

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