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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: I = None
        self.u: C = None
        self.x: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: A = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: G = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: G = None
        self.u: F = None
        self.txt = txt

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

e.r = h
e.v = h
e.q = g
l.o = m
l.u = m
l.y = f
l.x = e
m.z = g
m.s = d
a.t = d
a.u = d
a.w = f
a.s = l
a.v = l
a.r = m
a.q = m
a.x = h
h.r = l
h.s = e
h.o = m
d.t = f
d.w = g
d.x = m
g.z = h
k.s = d
k.z = f
f.t = l
f.o = g
f.u = d
i.t = d
i.u = d
i.w = f
i.s = l
i.v = l
i.r = m
i.q = m
i.x = h
assert i.t.w.z.r.x.q.z.txt == "
class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: E = None
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: I = None
        self.u: C = None
        self.x: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: A = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: G = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: G = None
        self.u: F = None
        self.txt = txt

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

e.r = h
e.v = h
e.q = g
l.o = m
l.u = m
l.y = f
l.x = e
m.z = g
m.s = d
a.t = d
a.u = d
a.w = f
a.s = l
a.v = l
a.r = m
a.q = m
a.x = h
h.r = l
h.s = e
h.o = m
d.t = f
d.w = g
d.x = m
g.z = h
k.s = d
k.z = f
f.t = l
f.o = g
f.u = d
i.t = d
i.u = d
i.w = f
i.s = l
i.v = l
i.r = m
i.q = m
i.x = h
assert i.t.w.z.r.x.q.z.txt == "h"