class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: B = None
        self.v: C = None
        self.q: C = None
        self.p: F = None
        self.t: D = None
        self.x: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: C = None
        self.t: E = None
        self.z: G = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: F = None
        self.p: F = None
        self.o: B = None
        self.r: B = None
        self.txt = txt

g = A("g")
l = B("l")
m = C("m")
h = D("h")
d = E("d")
a = F("a")
k = G("k")
n = A("n")
f = D("f")

g.v = l
g.s = m
l.q = a
l.y = m
m.v = d
m.w = n
m.y = n
m.o = k
m.u = k
m.t = a
m.q = h
h.r = f
h.t = f
h.x = f
h.w = l
h.v = m
h.q = m
h.p = a
d.x = f
a.x = l
a.o = m
a.u = m
a.t = d
a.z = k
k.t = m
k.z = a
k.p = a
k.o = l
k.r = l
n.v = l
n.s = m
f.r = h
f.t = h
f.x = h
f.w = l
f.v = m
f.q = m
f.p = a
assert k.t.t.t.x.v.v.x.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: B = None
        self.v: C = None
        self.q: C = None
        self.p: F = None
        self.t: D = None
        self.x: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: C = None
        self.t: E = None
        self.z: G = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: F = None
        self.p: F = None
        self.o: B = None
        self.r: B = None
        self.txt = txt

g = A("g")
l = B("l")
m = C("m")
h = D("h")
d = E("d")
a = F("a")
k = G("k")
n = A("n")
f = D("f")

g.v = l
g.s = m
l.q = a
l.y = m
m.v = d
m.w = n
m.y = n
m.o = k
m.u = k
m.t = a
m.q = h
h.r = f
h.t = f
h.x = f
h.w = l
h.v = m
h.q = m
h.p = a
d.x = f
a.x = l
a.o = m
a.u = m
a.t = d
a.z = k
k.t = m
k.z = a
k.p = a
k.o = l
k.r = l
n.v = l
n.s = m
f.r = h
f.t = h
f.x = h
f.w = l
f.v = m
f.q = m
f.p = a
assert k.t.t.t.x.v.v.x.txt == "f"