class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: D = None
        self.r: F = None
        self.o: E = None
        self.y: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: H = None
        self.y: I = None
        self.p: I = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: E = None
        self.p: B = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: C = None
        self.v: G = None
        self.r: I = None
        self.o: H = None
        self.u: I = None
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: E = None
        self.q: E = None
        self.o: E = None
        self.x: A = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: B = None
        self.z: C = None
        self.o: H = None
        self.y: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: H = None
        self.y: I = None
        self.p: I = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: E = None
        self.p: B = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: C = None
        self.v: G = None
        self.r: I = None
        self.o: H = None
        self.u: I = None
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: E = None
        self.q: E = None
        self.o: E = None
        self.x: A = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: B = None
        self.z: C = None
        self.o: H = None
        self.y: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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