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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: E = None
        self.q: G = None
        self.v: A = None
        self.x: D = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: D = None
        self.u: G = None
        self.t: E = None
        self.o: G = None
        self.v: E = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: A = None
        self.y: C = None
        self.s: C = None
        self.u: E = None
        self.z: F = None
        self.v: B = None
        self.txt = txt

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

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

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

k = A("k")
h = B("h")
e = C("e")
a = D("a")
l = E("l")
b = F("b")
j = G("j")
i = F("i")
f = F("f")

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: E = None
        self.q: G = None
        self.v: A = None
        self.x: D = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: D = None
        self.u: G = None
        self.t: E = None
        self.o: G = None
        self.v: E = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: A = None
        self.y: C = None
        self.s: C = None
        self.u: E = None
        self.z: F = None
        self.v: B = None
        self.txt = txt

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

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

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

k = A("k")
h = B("h")
e = C("e")
a = D("a")
l = E("l")
b = F("b")
j = G("j")
i = F("i")
f = F("f")

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