class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: E = None
        self.s: I = None
        self.x: E = None
        self.q: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: F = None
        self.q: E = None
        self.z: H = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: E = None
        self.p: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: A = None
        self.z: G = None
        self.u: F = None
        self.w: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: B = None
        self.r: D = None
        self.p: I = None
        self.v: D = None
        self.o: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: B = None
        self.u: E = None
        self.w: E = None
        self.q: A = None
        self.r: A = None
        self.p: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: F = None
        self.q: E = None
        self.z: H = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: E = None
        self.p: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: A = None
        self.z: G = None
        self.u: F = None
        self.w: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: B = None
        self.r: D = None
        self.p: I = None
        self.v: D = None
        self.o: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: B = None
        self.u: E = None
        self.w: E = None
        self.q: A = None
        self.r: A = None
        self.p: D = None
        self.txt = txt

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

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