class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: E = None
        self.q: E = None
        self.p: I = None
        self.v: G = None
        self.s: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: D = None
        self.v: E = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: E = None
        self.p: E = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: I = None
        self.x: B = None
        self.r: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: D = None
        self.v: E = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: E = None
        self.p: E = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: I = None
        self.x: B = None
        self.r: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

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