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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: A = None
        self.q: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: D = None
        self.r: B = None
        self.q: D = None
        self.z: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: A = None
        self.q: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: D = None
        self.r: B = None
        self.q: D = None
        self.z: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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