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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: F = None
        self.q: B = None
        self.p: C = None
        self.txt = txt

m = A("m")
g = B("g")
i = C("i")
j = D("j")
e = E("e")
b = F("b")
n = G("n")
l = A("l")
f = C("f")
k = B("k")

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: F = None
        self.q: B = None
        self.p: C = None
        self.txt = txt

m = A("m")
g = B("g")
i = C("i")
j = D("j")
e = E("e")
b = F("b")
n = G("n")
l = A("l")
f = C("f")
k = B("k")

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