class A:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: H = None
        self.u: G = None
        self.r: H = None
        self.z: F = None
        self.o: I = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: H = None
        self.u: G = None
        self.r: H = None
        self.z: F = None
        self.o: I = None
        self.txt = txt

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

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

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

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

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

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