class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: G = None
        self.s: H = None
        self.w: D = None
        self.o: A = None
        self.p: D = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: A = None
        self.y: E = None
        self.z: B = None
        self.txt = txt

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

f.x = k
d.u = i
d.s = g
d.v = f
b.w = e
a.r = b
a.u = b
h.y = a
k.o = h
k.r = d
k.w = e
i.v = e
i.s = e
i.z = n
i.w = a
i.p = a
i.o = f
i.x = f
e.u = f
e.v = f
e.y = h
e.z = d
g.w = e
n.v = e
n.s = e
n.z = i
n.w = a
n.p = a
n.o = f
n.x = f
assert i.v.y.y.r.w.y.txt == "
class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: G = None
        self.s: H = None
        self.w: D = None
        self.o: A = None
        self.p: D = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: A = None
        self.y: E = None
        self.z: B = None
        self.txt = txt

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

f.x = k
d.u = i
d.s = g
d.v = f
b.w = e
a.r = b
a.u = b
h.y = a
k.o = h
k.r = d
k.w = e
i.v = e
i.s = e
i.z = n
i.w = a
i.p = a
i.o = f
i.x = f
e.u = f
e.v = f
e.y = h
e.z = d
g.w = e
n.v = e
n.s = e
n.z = i
n.w = a
n.p = a
n.o = f
n.x = f
assert i.v.y.y.r.w.y.txt == "h"