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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: E = None
        self.u: H = None
        self.z: E = None
        self.w: F = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: G = None
        self.s: C = None
        self.q: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: E = None
        self.u: H = None
        self.z: E = None
        self.w: F = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: G = None
        self.s: C = None
        self.q: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: A = None
        self.txt = txt

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

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