class A:
    def __init__(self, txt: str):
        self.w: I = None
        self.u: F = None
        self.r: H = None
        self.y: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: C = None
        self.z: F = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: C = None
        self.z: F = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

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

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