class A:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: E = None
        self.x: H = None
        self.t: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: F = None
        self.z: C = None
        self.o: E = None
        self.y: A = None
        self.p: A = None
        self.t: F = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: F = None
        self.z: C = None
        self.o: E = None
        self.y: A = None
        self.p: A = None
        self.t: F = None
        self.v: F = None
        self.txt = txt

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

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