class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: G = None
        self.s: H = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: G = None
        self.o: D = None
        self.v: E = None
        self.t: E = None
        self.w: E = 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.s: G = None
        self.t: A = None
        self.u: A = None
        self.q: E = None
        self.z: E = None
        self.o: G = None
        self.y: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: G = None
        self.o: D = None
        self.v: E = None
        self.t: E = None
        self.w: E = 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.s: G = None
        self.t: A = None
        self.u: A = None
        self.q: E = None
        self.z: E = None
        self.o: G = None
        self.y: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

f.u = a
f.w = l
f.s = m
f.p = h
j.s = h
j.o = h
j.u = l
j.v = i
j.t = i
j.w = i
k.w = f
h.s = l
h.o = l
h.t = f
h.u = f
h.q = i
h.z = i
h.y = c
i.r = l
a.t = h
l.r = m
l.o = a
l.s = f
m.z = j
c.z = l
c.v = l
c.y = k
c.r = k
c.p = h
c.u = m
c.s = j
c.t = a
assert c.t.t.y.y.w.txt == "f"