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

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: I = None
        self.txt = txt

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: I = None
        self.txt = txt

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

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

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

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

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

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