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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: G = None
        self.r: C = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: C = None
        self.x: E = None
        self.p: A = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: G = None
        self.u: G = None
        self.s: G = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: D = None
        self.z: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: G = None
        self.r: C = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: C = None
        self.x: E = None
        self.p: A = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: G = None
        self.u: G = None
        self.s: G = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: D = None
        self.z: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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