class A:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: F = None
        self.z: I = None
        self.t: I = None
        self.v: C = None
        self.o: G = None
        self.y: B = None
        self.s: C = None
        self.x: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: A = None
        self.o: B = None
        self.x: G = None
        self.q: D = None
        self.s: D = None
        self.v: D = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: H = None
        self.v: F = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: H = None
        self.u: I = None
        self.o: I = None
        self.z: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: A = None
        self.o: B = None
        self.x: G = None
        self.q: D = None
        self.s: D = None
        self.v: D = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: H = None
        self.v: F = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: H = None
        self.u: I = None
        self.o: I = None
        self.z: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: B = None
        self.txt = txt

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

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