class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: E = None
        self.o: B = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: A = None
        self.y: I = None
        self.t: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: C = None
        self.y: C = None
        self.z: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: G = None
        self.y: A = None
        self.txt = txt

e = A("e")
n = B("n")
j = C("j")
d = D("d")
l = E("l")
b = F("b")
m = G("m")
c = H("c")
g = I("g")

e.x = l
e.q = l
e.o = n
e.v = j
n.q = l
n.s = e
n.y = g
n.t = c
j.q = g
j.t = c
d.u = e
d.q = c
l.u = d
l.t = j
l.y = j
l.z = j
b.z = d
b.s = d
b.y = l
m.z = l
c.r = e
g.z = c
g.x = m
g.y = e
assert c.r.o.s.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: E = None
        self.o: B = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: A = None
        self.y: I = None
        self.t: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: C = None
        self.y: C = None
        self.z: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: G = None
        self.y: A = None
        self.txt = txt

e = A("e")
n = B("n")
j = C("j")
d = D("d")
l = E("l")
b = F("b")
m = G("m")
c = H("c")
g = I("g")

e.x = l
e.q = l
e.o = n
e.v = j
n.q = l
n.s = e
n.y = g
n.t = c
j.q = g
j.t = c
d.u = e
d.q = c
l.u = d
l.t = j
l.y = j
l.z = j
b.z = d
b.s = d
b.y = l
m.z = l
c.r = e
g.z = c
g.x = m
g.y = e
assert c.r.o.s.txt == "e"