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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: A = None
        self.t: B = None
        self.y: F = None
        self.r: A = None
        self.o: D = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: C = None
        self.s: F = None
        self.x: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: A = None
        self.s: G = None
        self.p: B = None
        self.x: G = None
        self.u: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: A = None
        self.t: B = None
        self.y: F = None
        self.r: A = None
        self.o: D = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: C = None
        self.s: F = None
        self.x: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: A = None
        self.s: G = None
        self.p: B = None
        self.x: G = None
        self.u: E = None
        self.txt = txt

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

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