class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: B = None
        self.u: D = None
        self.s: G = None
        self.o: B = None
        self.z: E = None
        self.r: H = None
        self.w: H = None
        self.txt = txt

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

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: A = None
        self.o: G = None
        self.y: F = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: A = None
        self.o: G = None
        self.y: F = None
        self.r: C = None
        self.txt = txt

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

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