class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: C = None
        self.q: H = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: E = None
        self.o: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: H = None
        self.w: H = None
        self.p: E = None
        self.q: F = None
        self.u: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: C = None
        self.t: C = None
        self.u: A = None
        self.p: C = None
        self.s: A = None
        self.w: A = None
        self.v: A = None
        self.r: H = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: E = None
        self.o: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: H = None
        self.w: H = None
        self.p: E = None
        self.q: F = None
        self.u: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: C = None
        self.t: C = None
        self.u: A = None
        self.p: C = None
        self.s: A = None
        self.w: A = None
        self.v: A = None
        self.r: H = None
        self.txt = txt

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

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

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

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

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