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

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: G = None
        self.z: B = None
        self.x: B = None
        self.o: I = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.x: I = None
        self.y: C = None
        self.v: B = None
        self.u: I = None
        self.o: D = None
        self.z: F = None
        self.p: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: F = None
        self.r: E = None
        self.v: I = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: F = None
        self.s: I = None
        self.v: E = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: E = None
        self.o: G = None
        self.s: D = None
        self.y: D = None
        self.t: B = None
        self.v: F = None
        self.p: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: G = None
        self.z: B = None
        self.x: B = None
        self.o: I = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.x: I = None
        self.y: C = None
        self.v: B = None
        self.u: I = None
        self.o: D = None
        self.z: F = None
        self.p: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: F = None
        self.r: E = None
        self.v: I = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: F = None
        self.s: I = None
        self.v: E = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: E = None
        self.o: G = None
        self.s: D = None
        self.y: D = None
        self.t: B = None
        self.v: F = None
        self.p: E = None
        self.txt = txt

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

g.q = j
j.y = e
j.z = g
j.o = d
j.u = i
f.u = e
f.v = m
f.x = h
f.z = i
a.q = j
a.z = j
a.x = j
a.r = e
a.o = i
a.p = m
m.r = i
m.x = i
m.u = i
m.y = f
m.v = j
m.o = n
m.z = d
m.p = d
d.r = j
e.p = a
e.u = d
e.r = m
e.v = i
e.t = h
h.p = e
h.o = d
h.s = i
h.v = m
h.y = j
i.z = j
i.t = j
i.r = m
i.p = m
i.o = e
i.s = a
i.y = n
i.v = d
n.q = j
n.z = j
n.x = j
n.r = e
n.o = i
n.p = m
assert i.s.x.o.r.u.v.r.txt == "j"