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

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: H = None
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: E = None
        self.w: H = None
        self.z: I = None
        self.y: C = None
        self.p: C = None
        self.v: E = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: G = None
        self.q: D = None
        self.v: G = None
        self.r: A = None
        self.s: I = None
        self.w: D = None
        self.z: H = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

g.u = h
g.o = h
g.r = b
l.z = d
l.q = g
k.u = i
k.r = i
k.v = i
d.t = i
d.w = i
d.q = a
d.v = a
d.z = h
d.y = k
d.p = k
d.r = b
a.p = h
a.s = h
a.y = m
a.v = m
a.q = d
a.w = d
a.r = g
a.t = g
a.z = i
b.y = a
m.u = g
m.o = g
m.t = h
m.y = h
m.w = k
m.z = d
m.p = a
i.v = m
i.q = l
i.r = l
h.t = d
h.u = b
assert i.r.z.z.t.t.r.z.p.u.txt == "
class A:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: I = None
        self.r: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: H = None
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: E = None
        self.w: H = None
        self.z: I = None
        self.y: C = None
        self.p: C = None
        self.v: E = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: G = None
        self.q: D = None
        self.v: G = None
        self.r: A = None
        self.s: I = None
        self.w: D = None
        self.z: H = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

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