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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: A = None
        self.t: D = None
        self.s: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: H = None
        self.t: B = None
        self.x: H = None
        self.q: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: A = None
        self.t: D = None
        self.s: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: H = None
        self.t: B = None
        self.x: H = None
        self.q: D = None
        self.txt = txt

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

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