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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: C = None
        self.o: E = None
        self.v: H = None
        self.u: A = None
        self.z: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: H = None
        self.s: D = None
        self.q: D = None
        self.v: B = None
        self.w: B = None
        self.t: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: G = None
        self.r: D = None
        self.y: F = None
        self.v: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: C = None
        self.o: E = None
        self.v: H = None
        self.u: A = None
        self.z: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: H = None
        self.s: D = None
        self.q: D = None
        self.v: B = None
        self.w: B = None
        self.t: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: G = None
        self.r: D = None
        self.y: F = None
        self.v: F = None
        self.txt = txt

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

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