class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: F = None
        self.y: G = None
        self.r: D = None
        self.o: E = None
        self.t: H = None
        self.p: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.y: D = None
        self.x: A = None
        self.t: H = None
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: A = None
        self.r: C = None
        self.t: H = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.y: D = None
        self.x: A = None
        self.t: H = None
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: A = None
        self.r: C = None
        self.t: H = None
        self.txt = txt

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

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

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

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

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

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

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