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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: H = None
        self.t: D = None
        self.q: E = None
        self.x: E = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: G = None
        self.p: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: H = None
        self.t: D = None
        self.q: E = None
        self.x: E = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: G = None
        self.p: G = None
        self.txt = txt

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

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