class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: G = None
        self.o: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: F = None
        self.t: G = None
        self.y: F = None
        self.w: D = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: E = None
        self.t: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: F = None
        self.t: G = None
        self.y: F = None
        self.w: D = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: E = None
        self.t: C = None
        self.txt = txt

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

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