class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: E = None
        self.u: F = None
        self.s: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: H = None
        self.r: A = None
        self.z: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: I = None
        self.s: G = None
        self.v: A = None
        self.p: F = None
        self.y: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: F = None
        self.p: I = None
        self.x: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: E = None
        self.q: E = None
        self.t: C = None
        self.o: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: H = None
        self.r: A = None
        self.z: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: I = None
        self.s: G = None
        self.v: A = None
        self.p: F = None
        self.y: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: F = None
        self.p: I = None
        self.x: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: E = None
        self.q: E = None
        self.t: C = None
        self.o: C = None
        self.txt = txt

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

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

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