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

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

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: B = None
        self.t: G = None
        self.r: G = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: G = None
        self.y: H = None
        self.x: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: C = None
        self.x: B = None
        self.q: B = None
        self.t: F = None
        self.v: G = None
        self.z: B = None
        self.p: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: B = None
        self.t: G = None
        self.r: G = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: G = None
        self.y: H = None
        self.x: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: C = None
        self.x: B = None
        self.q: B = None
        self.t: F = None
        self.v: G = None
        self.z: B = None
        self.p: D = None
        self.txt = txt

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

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