class A:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: F = None
        self.o: A = None
        self.z: I = None
        self.p: F = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: E = None
        self.x: I = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: F = None
        self.u: E = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: I = None
        self.v: C = None
        self.p: A = None
        self.r: D = None
        self.x: H = None
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: F = None
        self.o: A = None
        self.z: I = None
        self.p: F = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: E = None
        self.x: I = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: F = None
        self.u: E = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: I = None
        self.v: C = None
        self.p: A = None
        self.r: D = None
        self.x: H = None
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

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

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

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

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