class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.o: C = None
        self.w: A = None
        self.t: I = None
        self.y: C = None
        self.v: I = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: D = None
        self.v: H = None
        self.u: B = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: I = None
        self.w: J = None
        self.t: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: G = None
        self.x: I = None
        self.z: G = None
        self.r: A = None
        self.o: A = None
        self.y: D = None
        self.s: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: C = None
        self.u: G = None
        self.r: A = None
        self.z: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: A = None
        self.o: C = None
        self.y: D = None
        self.p: A = None
        self.w: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.o: C = None
        self.w: A = None
        self.t: I = None
        self.y: C = None
        self.v: I = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: D = None
        self.v: H = None
        self.u: B = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: I = None
        self.w: J = None
        self.t: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: G = None
        self.x: I = None
        self.z: G = None
        self.r: A = None
        self.o: A = None
        self.y: D = None
        self.s: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: C = None
        self.u: G = None
        self.r: A = None
        self.z: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: A = None
        self.o: C = None
        self.y: D = None
        self.p: A = None
        self.w: A = None
        self.txt = txt

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

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