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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: E = None
        self.x: B = None
        self.s: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: G = None
        self.t: G = None
        self.y: B = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: G = None
        self.v: G = None
        self.w: B = None
        self.y: A = None
        self.p: G = None
        self.z: A = None
        self.x: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: E = None
        self.x: B = None
        self.s: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: G = None
        self.t: G = None
        self.y: B = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: G = None
        self.v: G = None
        self.w: B = None
        self.y: A = None
        self.p: G = None
        self.z: A = None
        self.x: E = None
        self.txt = txt

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

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