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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: C = None
        self.t: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: C = None
        self.t: B = None
        self.txt = txt

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

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

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