class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: G = None
        self.v: I = None
        self.u: E = None
        self.p: E = None
        self.s: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: B = None
        self.y: A = None
        self.v: H = None
        self.p: A = None
        self.t: E = None
        self.o: G = None
        self.s: F = None
        self.q: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: B = None
        self.y: A = None
        self.v: H = None
        self.p: A = None
        self.t: E = None
        self.o: G = None
        self.s: F = None
        self.q: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: D = None
        self.txt = txt

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

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

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