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

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: E = None
        self.w: B = None
        self.z: A = None
        self.u: H = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: A = None
        self.z: F = None
        self.s: B = None
        self.w: H = None
        self.u: E = None
        self.r: I = None
        self.txt = txt

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: E = None
        self.w: B = None
        self.z: A = None
        self.u: H = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: A = None
        self.z: F = None
        self.s: B = None
        self.w: H = None
        self.u: E = None
        self.r: I = None
        self.txt = txt

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

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

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

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

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

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

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