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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: A = None
        self.z: G = None
        self.q: B = None
        self.v: H = None
        self.w: H = None
        self.x: B = None
        self.s: E = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: C = None
        self.r: G = None
        self.w: D = None
        self.y: G = None
        self.s: B = None
        self.v: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: B = None
        self.p: D = None
        self.v: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: H = None
        self.z: A = None
        self.v: E = None
        self.q: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: A = None
        self.z: G = None
        self.q: B = None
        self.v: H = None
        self.w: H = None
        self.x: B = None
        self.s: E = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: C = None
        self.r: G = None
        self.w: D = None
        self.y: G = None
        self.s: B = None
        self.v: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: B = None
        self.p: D = None
        self.v: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: H = None
        self.z: A = None
        self.v: E = None
        self.q: G = None
        self.txt = txt

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

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