class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: I = None
        self.u: B = None
        self.x: I = None
        self.s: B = None
        self.z: G = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.q: D = None
        self.v: A = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: G = None
        self.z: A = None
        self.u: A = None
        self.v: G = None
        self.w: G = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: A = None
        self.y: A = None
        self.s: F = None
        self.q: I = None
        self.o: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: C = None
        self.v: A = None
        self.u: D = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: H = None
        self.p: C = None
        self.x: C = None
        self.u: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.q: D = None
        self.v: A = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: G = None
        self.z: A = None
        self.u: A = None
        self.v: G = None
        self.w: G = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: A = None
        self.y: A = None
        self.s: F = None
        self.q: I = None
        self.o: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: C = None
        self.v: A = None
        self.u: D = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: H = None
        self.p: C = None
        self.x: C = None
        self.u: G = None
        self.txt = txt

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

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