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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.w: B = None
        self.u: D = None
        self.y: I = None
        self.s: B = None
        self.r: B = None
        self.o: A = None
        self.q: A = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.w: B = None
        self.u: D = None
        self.y: I = None
        self.s: B = None
        self.r: B = None
        self.o: A = None
        self.q: A = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

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