class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: I = None
        self.r: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: C = None
        self.w: I = None
        self.r: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: G = None
        self.x: D = None
        self.s: G = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: C = None
        self.w: I = None
        self.r: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: G = None
        self.x: D = None
        self.s: G = None
        self.r: E = None
        self.txt = txt

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

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

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