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

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: I = None
        self.u: B = None
        self.s: E = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: H = None
        self.x: B = None
        self.t: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: E = None
        self.v: D = None
        self.z: G = None
        self.y: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: I = None
        self.u: B = None
        self.s: E = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: H = None
        self.x: B = None
        self.t: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: E = None
        self.v: D = None
        self.z: G = None
        self.y: E = None
        self.txt = txt

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

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