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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: H = None
        self.y: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: B = None
        self.t: J = None
        self.q: J = None
        self.s: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: H = None
        self.y: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: B = None
        self.t: J = None
        self.q: J = None
        self.s: C = None
        self.txt = txt

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

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

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

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