class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: G = None
        self.u: A = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: G = None
        self.z: A = None
        self.p: E = None
        self.v: I = None
        self.t: B = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: H = None
        self.u: F = None
        self.w: D = None
        self.r: H = None
        self.o: I = None
        self.s: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: C = None
        self.t: G = None
        self.y: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: G = None
        self.u: A = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: G = None
        self.z: A = None
        self.p: E = None
        self.v: I = None
        self.t: B = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: H = None
        self.u: F = None
        self.w: D = None
        self.r: H = None
        self.o: I = None
        self.s: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: C = None
        self.t: G = None
        self.y: C = None
        self.txt = txt

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

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