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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: F = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: E = None
        self.s: H = None
        self.z: I = None
        self.o: C = None
        self.q: E = None
        self.t: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: F = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: E = None
        self.s: H = None
        self.z: I = None
        self.o: C = None
        self.q: E = None
        self.t: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: B = None
        self.txt = txt

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

n.q = k
n.z = d
d.r = j
d.y = f
j.t = m
c.s = m
c.w = a
c.q = a
c.t = e
c.x = j
k.w = n
k.z = e
k.u = m
k.q = c
f.s = d
m.x = k
m.v = k
m.q = k
m.s = e
m.t = e
m.z = a
m.o = j
e.t = a
e.v = f
e.w = c
a.z = k
a.r = d
b.r = j
b.y = f
assert n.q.w.z.y.s.r.t.t.txt == "e"