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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: E = None
        self.u: H = None
        self.x: G = None
        self.s: F = None
        self.y: E = None
        self.w: H = None
        self.v: A = None
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.s: B = None
        self.r: C = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: G = None
        self.u: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: E = None
        self.txt = txt

n = A("n")
j = B("j")
c = C("c")
b = D("b")
g = E("g")
m = F("m")
l = G("l")
e = H("e")
h = I("h")

n.q = b
n.w = b
n.v = m
n.y = g
n.p = g
n.r = g
n.o = j
n.x = e
n.u = e
j.z = c
j.t = g
j.y = g
j.u = e
j.w = e
j.x = l
j.s = m
j.v = n
j.r = b
c.y = e
b.p = h
b.s = j
b.r = c
b.v = c
g.y = l
g.v = l
g.u = h
m.u = e
m.z = n
m.s = c
l.z = n
l.v = g
e.o = b
e.z = c
e.v = c
e.t = c
e.s = n
e.q = g
h.s = e
h.q = g
assert c.y.q.u.s.txt == "
class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: F = None
        self.y: E = None
        self.o: B = None
        self.p: E = None
        self.w: D = None
        self.x: H = None
        self.r: E = None
        self.u: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: E = None
        self.u: H = None
        self.x: G = None
        self.s: F = None
        self.y: E = None
        self.w: H = None
        self.v: A = None
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.s: B = None
        self.r: C = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: G = None
        self.u: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: E = None
        self.txt = txt

n = A("n")
j = B("j")
c = C("c")
b = D("b")
g = E("g")
m = F("m")
l = G("l")
e = H("e")
h = I("h")

n.q = b
n.w = b
n.v = m
n.y = g
n.p = g
n.r = g
n.o = j
n.x = e
n.u = e
j.z = c
j.t = g
j.y = g
j.u = e
j.w = e
j.x = l
j.s = m
j.v = n
j.r = b
c.y = e
b.p = h
b.s = j
b.r = c
b.v = c
g.y = l
g.v = l
g.u = h
m.u = e
m.z = n
m.s = c
l.z = n
l.v = g
e.o = b
e.z = c
e.v = c
e.t = c
e.s = n
e.q = g
h.s = e
h.q = g
assert c.y.q.u.s.txt == "e"