class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: C = None
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: A = None
        self.t: F = None
        self.q: A = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: C = None
        self.u: F = None
        self.y: D = None
        self.o: E = None
        self.v: E = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: F = None
        self.u: A = None
        self.p: C = None
        self.t: I = None
        self.o: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: F = None
        self.txt = txt

h = A("h")
d = B("d")
e = C("e")
j = D("j")
a = E("a")
f = F("f")
l = G("l")
i = H("i")
m = I("m")

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: A = None
        self.t: F = None
        self.q: A = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: C = None
        self.u: F = None
        self.y: D = None
        self.o: E = None
        self.v: E = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: F = None
        self.u: A = None
        self.p: C = None
        self.t: I = None
        self.o: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: F = None
        self.txt = txt

h = A("h")
d = B("d")
e = C("e")
j = D("j")
a = E("a")
f = F("f")
l = G("l")
i = H("i")
m = I("m")

h.u = a
h.p = e
h.t = d
d.z = l
d.p = h
d.q = h
d.t = f
e.s = j
e.o = j
j.s = e
j.w = l
j.v = l
a.y = i
a.t = f
f.x = d
f.p = h
f.t = h
f.r = h
f.q = a
f.w = j
f.s = m
f.o = i
l.q = d
l.t = e
l.u = f
l.y = j
l.r = j
l.o = a
l.v = a
i.s = l
i.x = f
i.u = h
i.p = e
i.t = m
i.o = j
m.q = h
m.r = f
assert e.o.s.o.txt == "j"