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

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

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: C = None
        self.y: F = None
        self.q: H = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: I = None
        self.x: D = None
        self.y: F = None
        self.z: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: E = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: C = None
        self.r: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: C = None
        self.w: B = None
        self.q: B = None
        self.p: F = None
        self.z: B = None
        self.r: G = None
        self.u: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: C = None
        self.y: F = None
        self.q: H = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: I = None
        self.x: D = None
        self.y: F = None
        self.z: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: E = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: C = None
        self.r: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: C = None
        self.w: B = None
        self.q: B = None
        self.p: F = None
        self.z: B = None
        self.r: G = None
        self.u: C = None
        self.txt = txt

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

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