class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: B = None
        self.z: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.y: G = None
        self.x: C = None
        self.r: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: B = None
        self.q: A = None
        self.p: D = None
        self.x: C = None
        self.o: G = None
        self.z: D = None
        self.t: A = None
        self.w: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.y: G = None
        self.x: C = None
        self.r: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: B = None
        self.q: A = None
        self.p: D = None
        self.x: C = None
        self.o: G = None
        self.z: D = None
        self.t: A = None
        self.w: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: F = None
        self.txt = txt

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

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