class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: I = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: D = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: I = None
        self.z: I = None
        self.q: A = None
        self.t: H = None
        self.s: B = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: B = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: F = None
        self.u: D = None
        self.s: J = None
        self.y: J = None
        self.z: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: D = None
        self.s: D = None
        self.q: B = None
        self.r: G = None
        self.t: H = None
        self.y: H = None
        self.o: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: A = None
        self.s: D = None
        self.o: E = None
        self.y: A = None
        self.q: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: D = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: I = None
        self.z: I = None
        self.q: A = None
        self.t: H = None
        self.s: B = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: B = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: F = None
        self.u: D = None
        self.s: J = None
        self.y: J = None
        self.z: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: D = None
        self.s: D = None
        self.q: B = None
        self.r: G = None
        self.t: H = None
        self.y: H = None
        self.o: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: A = None
        self.s: D = None
        self.o: E = None
        self.y: A = None
        self.q: H = None
        self.txt = txt

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

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